On this page
pandas.Period.weekofyear
- Period.weekofyear
-
Get the week of the year on the given Period.
- Returns
-
- int
See also
-
Period.dayofweek
-
Get the day component of the Period.
-
Period.weekday
-
Get the day component of the Period.
Examples
>>> p = pd.Period("2018-03-11", "H") >>> p.weekofyear 10
>>> p = pd.Period("2018-02-01", "D") >>> p.weekofyear 5
>>> p = pd.Period("2018-01-06", "D") >>> p.weekofyear 1
© 2008–2022, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/1.5.0/reference/api/pandas.Period.weekofyear.html