File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -468,6 +468,12 @@ def __arrow_array__(self, type=None):
468
468
"day_of_week" ,
469
469
"""
470
470
The day of the week with Monday=0, Sunday=6.
471
+
472
+ Examples
473
+ --------
474
+ >>> idx = pd.PeriodIndex(["2023-01-01", "2023-01-02", "2023-01-03"], freq="D")
475
+ >>> idx.day_of_week
476
+ Index([6, 0, 1], dtype='int64')
471
477
""" ,
472
478
)
473
479
dayofweek = day_of_week
@@ -476,6 +482,18 @@ def __arrow_array__(self, type=None):
476
482
"day_of_year" ,
477
483
"""
478
484
The ordinal day of the year.
485
+
486
+ Examples
487
+ --------
488
+ >>> idx = pd.PeriodIndex(["2023-01-10", "2023-02-01", "2023-03-01"], freq="D")
489
+ >>> idx.dayofyear
490
+ Index([10, 32, 60], dtype='int64')
491
+
492
+ >>> idx = pd.PeriodIndex(["2023", "2024", "2025"], freq="Y")
493
+ >>> idx
494
+ PeriodIndex(['2023', '2024', '2025'], dtype='period[A-DEC]')
495
+ >>> idx.dayofyear
496
+ Index([365, 366, 365], dtype='int64')
479
497
""" ,
480
498
)
481
499
quarter = _field_accessor (
You can’t perform that action at this time.
0 commit comments