Series.dt
can be used to access series values as datetimelike and return multiple properties. Series.dt.date
Pandas Series.dt.date
returns an empty array of Python datetime.date objects.
Syntax: Series.dt.date
Parameter: None
Returns : numpy array
Example # 1: Use the Series.dt.date
attribute to return the date property of the underlying data a Series object.
|
Output:
We will now use the Series.dt.date
attribute to return the date property of the underlying data of this Series object.
|
Output:
As we can see from the output, the Series.dt.date
attribute successfully accessed and returned the date property of the underlying data in this series object.
Example # 2: Use the Series.dt.date
attribute to return the underlying date property of this Series object.
|
Output:
Now we will use the Series.dt attribute. date
to return the date property of the underlying data of this Series object.
|
Output:
As we can see from the output, the Series.dt.date
attribute successfully accessed and returned the date property of the underlying data in this series object.