We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48e680e commit 6d20a36Copy full SHA for 6d20a36
pandas/_libs/tslibs/period.pyx
@@ -1350,6 +1350,32 @@ cdef class _Period(object):
1350
1351
@property
1352
def week(self):
1353
+ """
1354
+ Get the week of the year on the given Period.
1355
+
1356
+ Returns
1357
+ -------
1358
+ int
1359
1360
+ See Also
1361
+ --------
1362
+ Period.dayofweek : Get the day component of the Period.
1363
+ Period.weekday : Get the day component of the Period.
1364
1365
+ Examples
1366
1367
+ >>> p = pd.Period("2018-03-11", "H")
1368
+ >>> p.week
1369
+ 10
1370
1371
+ >>> p = pd.Period("2018-02-01", "D")
1372
1373
+ 5
1374
1375
+ >>> p = pd.Period("2018-01-06", "D")
1376
1377
+ 1
1378
1379
return self.weekofyear
1380
1381
0 commit comments