File tree 1 file changed +30
-0
lines changed
1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -1318,6 +1318,36 @@ cdef class _Period(object):
1318
1318
1319
1319
@property
1320
1320
def dayofyear (self ):
1321
+ """
1322
+ Return the day of the year.
1323
+
1324
+ This attribute returns the day of the year on which the particular
1325
+ date occurs. The return value ranges between 1 to 365 for regular
1326
+ years and 1 to 366 for leap years.
1327
+
1328
+ Returns
1329
+ -------
1330
+ int
1331
+ The day of year.
1332
+
1333
+ See Also
1334
+ --------
1335
+ Period.day : Return the day of the month.
1336
+ Period.dayofweek : Return the day of week.
1337
+ PeriodIndex.dayofyear : Return the day of year of all indexes.
1338
+
1339
+ Examples
1340
+ --------
1341
+ >>> period = pd.Period("2015-10-23", freq='H')
1342
+ >>> period.dayofyear
1343
+ 296
1344
+ >>> period = pd.Period("2012-12-31", freq='D')
1345
+ >>> period.dayofyear
1346
+ 366
1347
+ >>> period = pd.Period("2013-01-01", freq='D')
1348
+ >>> period.dayofyear
1349
+ 1
1350
+ """
1321
1351
base, mult = get_freq_code(self .freq)
1322
1352
return pday_of_year(self .ordinal, base)
1323
1353
You can’t perform that action at this time.
0 commit comments