pandas.DatetimeIndex.day#

property DatetimeIndex.day[source]#

The day of the datetime.

This attribute returns the day of the month component of each datetime value in the DatetimeIndex.

See also

DatetimeIndex.year

The year of the datetime.

DatetimeIndex.month

The month as January=1, December=12.

DatetimeIndex.hour

The hours of the datetime.

Examples

>>> idx = pd.DatetimeIndex(["2000-01-01", "2000-01-02", "2000-01-03"])
>>> idx.day
Index([1, 2, 3], dtype='int32')