File tree 1 file changed +27
-0
lines changed
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -1255,6 +1255,33 @@ 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.
1263
+
1264
+ Returns
1265
+ -------
1266
+ int
1267
+ The day of year.
1268
+
1269
+ See Also
1270
+ --------
1271
+ Period.dayofweek : Return the day of week.
1272
+ Period.daysinmonth : Return the days in that month.
1273
+
1274
+ Examples
1275
+ --------
1276
+ >>> p = pd.Period("2015-10-23", freq='H')
1277
+ >>> p
1278
+ Period('2015-10-23 00:00', 'H')
1279
+ >>> p.dayofyear
1280
+ 296
1281
+ >>> q = pd.Period("2017-01-01", freq='H')
1282
+ >>> q.dayofyear
1283
+ 1
1284
+ """
1258
1285
base, mult = get_freq_code(self .freq)
1259
1286
return pday_of_year(self .ordinal, base)
1260
1287
You can’t perform that action at this time.
0 commit comments