Skip to content

LazyColumn.dt.day

day property

day: LazyColumn

Extracts the day of the month (1 to 31) from each datetime value.

Returns:

Name Type Description
LazyColumn LazyColumn

A new LazyColumn of integer values representing the day of the month.

Examples:

print(df.head())
#              my_datetime_column
# 0  2023-01-01 00:00:00  # day=1
# 1  2023-01-15 12:34:56  # day=15
# 2  2023-12-31 23:59:59  # day=31

df["my_datetime_column"].dt.day
# [1, 15, 31, ...]