File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -1309,6 +1309,37 @@ cdef class _Period(object):
1309
1309
1310
1310
@property
1311
1311
def dayofweek (self ):
1312
+ """
1313
+ Return the day of the week.
1314
+
1315
+ This attribute returns the day of the week on which the particular
1316
+ date for the given period occurs depending on the frequency with
1317
+ Monday=0, Sunday=6.
1318
+
1319
+ Returns
1320
+ -------
1321
+ Int
1322
+ Range from 0 to 6 (included).
1323
+
1324
+ See also
1325
+ --------
1326
+ Period.dayofyear : Return the day of the year.
1327
+ Period.daysinmonth : Return the number of days in that month.
1328
+
1329
+ Examples
1330
+ --------
1331
+ >>> period1 = pd.Period('2012-1-1 19:00', freq='H')
1332
+ >>> period1
1333
+ Period('2012-01-01 19:00', 'H')
1334
+ >>> period1.dayofweek
1335
+ 6
1336
+
1337
+ >>> period2 = pd.Period('2013-1-9 11:00', freq='H')
1338
+ >>> period2
1339
+ Period('2013-01-09 11:00', 'H')
1340
+ >>> period2.dayofweek
1341
+ 2
1342
+ """
1312
1343
base, mult = get_freq_code(self .freq)
1313
1344
return pweekday(self .ordinal, base)
1314
1345
You can’t perform that action at this time.
0 commit comments