VOOZH about

URL: https://www.geeksforgeeks.org/pandas/pandas-series-dt-dayofweek/

⇱ Pandas Series dt.dayofweek | Get Day of Week from DateTime Series in Pandas - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Pandas Series dt.dayofweek | Get Day of Week from DateTime Series in Pandas

Last Updated : 11 Jul, 2025

Pandas dt.dayofweek attribute returns the day of the week from the given DateTime Series Object. It is assumed the week starts on Monday, which is denoted by 0, and ends on Sunday which is denoted by 6.

Example:

Output:

👁 dt.dayofweek output

Syntax

Syntax: Series.dt.dayofweek 

Parameter: None 

Returns: Series with integers indicating day of week

How to Extract Day of Week From Pandas Series

To extract the day of the week from the Pandas Series we use the dt.dayofweek attribute of the Pandas library in Python.

Let us understand it better with an example:

Example:

Use the Series.dt.dayofweek attribute to return the day of the week for the given DateTime in the underlying data of the given Series object.

Output :

👁 datetime series created

Now we will use the dt.dayofweek attribute to return the day of the week for the given DateTime in the underlying data of the given Series object.

Output :

👁 day of week returned

As we can see in the output, the dt.dayofweek attribute has successfully accessed and returned the day of week in the underlying data of the given series object.

Comment

Explore