We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3d5499 commit f61097cCopy full SHA for f61097c
pandas/core/indexes/accessors.py
@@ -239,17 +239,15 @@ def isocalendar(self):
239
240
Examples
241
--------
242
- >>> pd.to_datetime(pd.Series(["2020-01-01"])).dt.isocalendar
243
- year week day
244
- 0 2020 1 3
245
>>> ser = pd.to_datetime(pd.Series(["2010-01-01", pd.NaT]))
246
>>> ser.dt.isocalendar
247
248
- 0 2009.0 53.0 5.0
249
- 1 NaN NaN NaN
250
- >>> pd.to_datetime(pd.Series(["2019-12-31"])).dt.isocalendar.week
251
- 0 1
252
- Name: week, dtype: int32
+ year week day
+ 0 2009 53 5
+ 1 <NA> <NA> <NA>
+ >>> ser.dt.isocalendar.week
+ 0 53
+ 1 <NA>
+ Name: week, dtype: Int64
253
"""
254
return self._get_values().isocalendar.set_index(self._parent.index)
255
0 commit comments