- API reference
- Series
- pandas.Serie...
pandas.Series.dt.isocalendar#
- Series.dt.isocalendar()[source]#
Calculate year, week, and day according to the ISO 8601 standard.
- Returns:
- DataFrame
With columns year, week and day.
See also
Timestamp.isocalendarFunction return a 3-tuple containing ISO year, week number, and weekday for the given Timestamp object.
datetime.date.isocalendarReturn a named tuple object with three components: year, week and weekday.
Examples
>>>ser=pd.to_datetime(pd.Series(["2010-01-01",pd.NaT]))>>>ser.dt.isocalendar() year week day0 2009 53 51 <NA> <NA> <NA>>>>ser.dt.isocalendar().week0 531 <NA>Name: week, dtype: UInt32
On this page