pandas.PeriodIndex.day_of_year#
- propertyPeriodIndex.day_of_year[source] #
The ordinal day of the year.
Examples
>>> idx = pd.PeriodIndex(["2023年01月10日", "2023年02月01日", "2023年03月01日"], freq="D") >>> idx.dayofyear Index([10, 32, 60], dtype='int64')
>>> idx = pd.PeriodIndex(["2023", "2024", "2025"], freq="Y") >>> idx PeriodIndex(['2023', '2024', '2025'], dtype='period[Y-DEC]') >>> idx.dayofyear Index([365, 366, 365], dtype='int64')