pyspark.sql.functions.minute¶
-
pyspark.sql.functions.
minute
(col: ColumnOrName) → pyspark.sql.column.Column¶ Extract the minutes of a given date as integer.
Examples
>>> import datetime >>> df = spark.createDataFrame([(datetime.datetime(2015, 4, 8, 13, 8, 15),)], ['ts']) >>> df.select(minute('ts').alias('minute')).collect() [Row(minute=8)]