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

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Teradata Package for Python
Release Number
20.00
Published
March 2024
Language
English (United States)
Last Update
2024-04-10
dita:id
TeradataPython_FxRef_Enterprise_2000
Product Category
Teradata Vantage
teradataml.geospatial.geodataframe.GeoDataFrame.count = count(self, distinct=False)
DESCRIPTION:
    Returns column-wise count of the GeoDataFrame.
 
PARAMETERS:
    distinct:
        Optional Argument.
        Specifies whether to exclude duplicate values while calculating the count.
        Default Value: False
        Types: bool
 
RETURNS:
    teradataml GeoDataFrame object with count() operation
    performed.
 
RAISES:
    TeradataMLException
    1. EXECUTION_FAILED - If count() operation fails to
        generate the column-wise count of the GeoDataFrame.
 
        Possible error message:
        Failed to perform 'count'. (Followed by error message).
 
    2. TDMLDF_AGGREGATE_COMBINED_ERR - If the count() operation
        doesn't support all the columns in the GeoDataFrame.
 
        Possible error message:
        No results. Below is/are the error message(s):
        All selected columns [(col2 -  PERIOD_TIME), (col3 -
        BLOB)] is/are unsupported for 'count' operation.
 
EXAMPLES :
    # Load the data to run the example.
    from teradataml.data.load_example_data import load_example_data
    load_example_data("GeoDataFrame", ["sample_shapes"])
 
    # Create teradataml GeoDataFrame.
    df1 = GeoDataFrame("sample_shapes")
    print(df1)
 
    # Prints count of the values in all the selected columns
    # (excluding None types).
    df1.count()