Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
w3resource

Pandas Series property: dt.dayofweek

Series.dt.dayofweek property

The dayofweek property is used to get the day of the week.

The day of the week with Monday=0, Sunday=6.
Note: It is assumed the week starts on Monday, which is denoted by 0 and ends on Sunday which is denoted by 6. This method is available on both Series with datetime values (using the dt accessor) or DatetimeIndex.

Syntax:

Series.dt.dayofweek
Pandas Series: dt.dayofweek property

Returns: Series or Index
Containing integers indicating the day number.

Example:


Download the Pandas Series Notebooks from here.

Previous: Select values between particular times of the day
Next: Series.dt.weekday property