Series.dt
can be used to access series values as datetimelike and return multiple properties. Series.dt.day
Pandas Series.dt.day
returns an empty array containing the day of the date and time in base data of this series object.
Syntax: Series.dt.day
Parameter: None
Returns: numpy array
Example # 1: 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 datetime in the underlying data of a given Series object.

Output:
As we can see from the output, the Series.dt.day
attribute successfully accessed and returned the day datetime in the underlying data of this Series object.
Example # 2: Use the Series.dt.day
attribute to return the datetime day in the underlying data of this Series object .

Output:
We will now use the Series.dt.day
attribute to return the datetime day in the underlying data of this Series object.

Exit:
As we can see from the output, the Series.dt.day
successfully accessed and returned the day of the datetime in the underlying data of the given series object.
Pandas for Everyone: Python Data Analysis (AddisonWesley Data & Analytics Series), 1st Edition. Pandas for Everyone brings together the practical knowledge and insights you need to solve realworl...
05/09/2021
A Practical Approach to Computer Algorithms Using Python® and C# Rod Stephens started out as a mathematician, but while studying at MIT, he discovered how much fun algorithms are. He took every al...
23/09/2020
Data and storage models are the basis for big data ecosystem stacks. While storage model captures the physical aspects and features for data storage, data model captures the logical representation and...
10/07/2020
It would be easy for me to develop native apps using Java, C++ or ObjectiveC and I am also able to learn Kotlin, Dart or Swift, but things are much easier when you just use Python. I have done a Djan...
23/09/2020