Teradata Package for Python Function Reference on VantageCloud Lake | 17.20 - __repr__ - 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.series.series.Series.__repr__ = __repr__(self)
Returns the string representation for a teradataml Series instance.
The string contains:
    1. A default index for row numbers.
    2. At most the first max_rows rows of the series as mentioned in the note below.
    3. The name and datatype of the series.
 
NOTES:
  - This makes an explicit call to get rows from the database.
  - To change number of rows to be printed set the max_rows option in options.display.display
  - Default value of max_rows is 10
 
EXAMPLES:
    >>> df
       masters   gpa     stats programming admitted
    id
    22     yes  3.46    Novice    Beginner        0
    36      no  3.00  Advanced      Novice        0
    15     yes  4.00  Advanced    Advanced        1
    38     yes  2.65  Advanced    Beginner        1
    5       no  3.44    Novice      Novice        0
    17      no  3.83  Advanced    Advanced        1
    34     yes  3.85  Advanced    Beginner        0
    13      no  4.00  Advanced      Novice        1
    26     yes  3.57  Advanced    Advanced        1
    19     yes  1.98  Advanced    Advanced        0
 
    >>> gpa = df.select(["gpa"]).squeeze()
    >>> gpa
    0    4.00
    1    2.33
    2    3.46
    3    3.83
    4    4.00
    5    2.65
    6    3.57
    7    3.44
    8    3.85
    9    3.95
    Name: gpa, dtype: float64