Teradata Package for Python Function Reference | 17.10 - 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

Product
Teradata Package for Python
Release Number
17.10
Published
April 2022
Language
English (United States)
Last Update
2022-08-19
lifecycle
previous
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
    >>>