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
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
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework