![]() |
VOOZH | about |
Pandas dt.day attribute returns a NumPy array containing the day value of the DateTime in the underlying data of the given series object.
Output
Syntax: Series.dt.day
Parameter : None
Returns: NumPy array containing day values
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:
Use the Series.dt.day attribute to return the day of the DateTime in the underlying data of the given Series object.
Output :
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 :
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.