Teradata Package for Python Function Reference | 20.00 - __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 - 20.00
- Deployment
- VantageCloud
- VantageCore
- Edition
- Enterprise
- IntelliFlex
- VMware
- Product
- Teradata Package for Python
- Release Number
- 20.00.00.03
- Published
- December 2024
- ft:locale
- en-US
- ft:lastEdition
- 2024-12-19
- dita:id
- TeradataPython_FxRef_Enterprise_2000
- 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