VOOZH about

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

⇱ Pandas Series dt.day | Extract Day Part from DateTime Series - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Pandas Series dt.day | Extract Day Part from DateTime Series

Last Updated : 11 Jul, 2025

Pandas dt.day attribute returns a NumPy array containing the day value of the DateTime in the underlying data of the given series object.

Example

Output

👁 output of dt.day attribute

Syntax

Syntax: Series.dt.day 

Parameter : None 

Returns: NumPy array containing day values

How to Extract Day From DateTime Series

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

Let us understand it better with an example:

Example:

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

Output :

👁 time series created

Now we will use the Series.dt.day attribute to return the day of the datetime in the underlying data of the given Series object.

Output :

👁 Image

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

Comment

Explore