Teradata Python Package Function Reference - shape - Teradata Python Package - Look here for syntax, methods and examples for the functions included in the Teradata Python Package.

Teradata® Python Package Function Reference

Product
Teradata Python Package
Release Number
16.20
Published
February 2020
Language
English (United States)
Last Update
2020-07-17
lifecycle
previous
Product Category
Teradata Vantage
teradataml.dataframe.dataframe.DataFrame.shape
Returns a tuple representing the dimensionality of the DataFrame.
 
PARAMETERS:
    None
 
RETURNS:
    Tuple representing the dimensionality of this DataFrame.
 
Examples:
    >>> load_example_data("dataframe","sales")
    >>> df = DataFrame.from_table('sales')
    >>> df
                  Feb   Jan   Mar   Apr  datetime
    accounts
    Orange Inc  210.0  None  None   250  04/01/2017
    Yellow Inc   90.0  None  None  None  04/01/2017
    Red Inc     200.0   150   140  None  04/01/2017
    Blue Inc     90.0    50    95   101  04/01/2017
    Jones LLC   200.0   150   140   180  04/01/2017
    Alpha Co    210.0   200   215   250  04/01/2017
    >>> df.shape
    (6, 6)
    >>>
 
RAISES:
    TeradataMlException (TDMLDF_INFO_ERROR)