pd.Timestamp pd.to_datetime(train[‘time’]) Property
Description
year
The year of the datetime
month
The month of the datetime
day
The days of the datetime
hour
The hour of the datetime
minute
The minutes of the datetime
second
The seconds of the datetime
microsecond
The microseconds of the datetime
nanosecond
The nanoseconds of the datetime
date
Returns datetime.date (does not contain timezone information)
time
Returns datetime.time (does not contain timezone information)
timetz
Returns datetime.time as local time with timezone information
dayofyear
The ordinal day of year
day_of_year
The ordinal day of year
weekofyear
The week ordinal of the year
week
The week ordinal of the year
dayofweek
The number of the day of the week with Monday=0, Sunday=6
day_of_week
The number of the day of the week with Monday=0, Sunday=6
weekday
The number of the day of the week with Monday=0, Sunday=6
quarter
Quarter of the date: Jan-Mar = 1, Apr-Jun = 2, etc.
days_in_month
The number of days in the month of the datetime
is_month_start
Logical indicating if first day of month (defined by frequency)
is_month_end
Logical indicating if last day of month (defined by frequency)
is_quarter_start
Logical indicating if first day of quarter (defined by frequency)
is_quarter_end
Logical indicating if last day of quarter (defined by frequency)
is_year_start
Logical indicating if first day of year (defined by frequency)
is_year_end
Logical indicating if last day of year (defined by frequency)
is_leap_year
Logical indicating if the date belongs to a leap year
pd.Timestamp