Teradata Package for Python Function Reference | 20.00 - minute - 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
- lifecycle
- latest
- Product Category
- Teradata Vantage
- teradataml.dataframe.sql.DataFrameColumn.minute = minute()
- DESCRIPTION:
Function returns the integer value for minute in the specified timestamp value in a column as a literal.
RAISES:
TypeError, ValueError, TeradataMlException
RETURNS:
DataFrameColumn
EXAMPLES:
# Load the data to run the example.
>>> load_example_data("dataframe", ["ocean_buoys"])
# Create a DataFrame on 'ocean_buoys' table.
>>> ocean_df = DataFrame.from_table('ocean_buoys')
# Example 1: Returns the integer value for minute in the specified timestamp value in a column as a literal.
>>> res_df = ocean_df.assign(res = ocean_df.TD_TIMECODE.minute())
>>> print(res_df)
TD_TIMECODE salinity temperature res
buoyid
1 2014-01-06 09:02:25.122200 55 78.0 2
1 2014-01-06 09:03:25.122200 55 79.0 3
1 2014-01-06 09:03:25.122200 55 72.0 3
0 2014-01-06 08:00:00.000000 55 10.0 0
0 2014-01-06 08:09:59.999999 55 99.0 9
0 2014-01-06 08:10:00.000000 55 10.0 10
0 2014-01-06 08:10:00.000000 55 100.0 10
44 2014-01-06 10:00:24.000000 55 43.0 0
0 2014-01-06 08:08:59.999999 55 NaN 8
1 2014-01-06 09:02:25.122200 55 71.0 2