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.yearThe year of the datetime.
DatetimeIndex.monthThe month as January=1, December=12.
DatetimeIndex.hourThe 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')