Teradata Python Package Function Reference - __repr__ - 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.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