Teradata Python Package Function Reference - min - 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.min = min(self)
- DESCRIPTION:
Returns column-wise minimum value of the dataframe.
PARAMETERS:
None
RETURNS:
teradataml DataFrame object with min()
operation performed.
RAISES:
TeradataMLException
1. TDMLDF_AGGREGATE_FAILED - If min() operation fails to
generate the column-wise minimum value of the dataframe.
Possible error message:
Unable to perform 'min()' on the dataframe.
2. TDMLDF_AGGREGATE_COMBINED_ERR - If the min() operation
doesn't support all the columns in the dataframe.
Possible error message:
No results. Below is/are the error message(s):
All selected columns [(col2 - PERIOD_TIME), (col3 -
BLOB)] is/are unsupported for 'min' operation.
EXAMPLES :
# Load the data to run the example.
>>> from teradataml.data.load_example_data import load_example_data
>>> load_example_data("dataframe", ["employee_info"])
# Create teradataml dataframe.
>>> df1 = DataFrame("employee_info")
>>> print(df1)
first_name marks dob joined_date
employee_no
101 abcde None None 02/12/05
100 abcd None None None
112 None None None 18/12/05
>>>
# Prints minimum value of each column(with supported data types).
>>> df1.min()
min_employee_no min_first_name min_marks min_dob min_joined_date
0 100 abcd None None 02/12/05
>>>
# Select only subset of columns from the DataFrame.
# Prints minimum value of each column(with supported data types).
>>> df3 = df1.select(['employee_no', 'first_name', 'joined_date'])
>>> df3.min()
min_employee_no min_first_name min_joined_date
0 100 abcd 02/12/05
>>>