Teradata Package for Python Function Reference on VantageCloud Lake | 17.20 - drop - Teradata Package for Python - Look here for syntax, methods and examples for the functions included in the Teradata Package for Python.

Teradata® Package for Python Function Reference on VantageCloud Lake

Deployment
VantageCloud
Edition
Lake
Product
Teradata Package for Python
Release Number
17.20
Publication Date
November 2022
Content Type
Programming Reference
Publication ID
B700-4500-112K
ft:locale
en-US
ft:lastEdition
2024-02-21
ft:sourceId
FTML
dita:id
TeradataPython_FxRef_Lake_1720
Product Category
Teradata Vantage
teradataml.geospatial.geodataframe.GeoDataFrame.drop = drop(self, labels=None, axis=0, columns=None)
DESCRIPTION:
    Drop specified labels from rows or columns.
 
    Remove rows or columns by specifying label names and corresponding
    axis, or by specifying the index or column names directly.
 
PARAMETERS:
    labels:
        Optional Argument. Required when "columns" is not provided.
        Single label or list-like. Can be Index or column labels to drop depending on axis.
        Types: str OR list of Strings (str)
 
    axis:
        Optional Argument.
        0 or 'index' for index labels
        1 or 'columns' for column labels
        Default Values: 0
        Permitted Values: 0, 1, 'index', 'columns'
        Types: int OR str
 
    columns:
        Optional Argument. Required when labels is not provided.
        Single label or list-like. This is an alternative to specifying axis=1 with labels.
        Cannot specify both labels and columns.
        Types: str OR list of Strings (str)
 
RETURNS:
    teradataml GeoDataFrame
 
RAISE:
    TeradataMlException
 
EXAMPLES:
    >>> load_example_data("geodataframe","sample_streets")
    >>> df = GeoDataFrame('sample_streets')
    >>> df
          street_name              street_shape
    skey
    1      Coast Blvd  LINESTRING (12 12,18 17)
    1     Main Street  LINESTRING (2 2,3 2,4 1)
    # Drop columns
    >>> df.drop(['street_name', 'skey'], axis=1)
                   street_shape
    0  LINESTRING (12 12,18 17)
    1  LINESTRING (2 2,3 2,4 1)
    >>> df.drop(columns=['street_shape'])
          street_name
    skey
    1      Coast Blvd
    1     Main Street
    >>>