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 @@ -1255,6 +1255,36 @@ cdef class _Period(object):
1255
1255
1256
1256
@property
1257
1257
def dayofyear (self ):
1258
+ """
1259
+ Return the day of the year.
1260
+
1261
+ This attribute returns the day of the year on which the particular
1262
+ date occurs. The return value ranges between 1 to 365 for regular
1263
+ years and 1 to 366 for leap years.
1264
+
1265
+ Returns
1266
+ -------
1267
+ int
1268
+ The day of year.
1269
+
1270
+ See Also
1271
+ --------
1272
+ Period.dayofweek : Return the day of week.
1273
+ Period.daysinmonth : Return the days in that month.
1274
+ PeriodIndex.dayofyear : Return the day of year of all indexes.
1275
+
1276
+ Examples
1277
+ --------
1278
+ >>> period = pd.Period("2015-10-23", freq='H')
1279
+ >>> period.dayofyear
1280
+ 296
1281
+ >>> period = pd.Period("2012-12-31", freq='D')
1282
+ >>> period.dayofyear
1283
+ 366
1284
+ >>> period = pd.Period("2013-01-01", freq='D')
1285
+ >>> period.dayofyear
1286
+ 1
1287
+ """
1258
1288
base, mult = get_freq_code(self .freq)
1259
1289
return pday_of_year(self .ordinal, base)
1260
1290
You can’t perform that action at this time.
0 commit comments