DatetimeIndex.date
Pandas DatetimeIndex.date
outputs an Index object containing the date values present in each of the DatetimeIndex object records.
Syntax: DatetimeIndex.date
Return: numpy array of python datetime.date
Example # 1: Use the DatetimeIndex.date
attribute to find the date portion of a DatetimeIndex object.
|
Output:
Now we want to find all date values present in the DatetimeIndex object.
|
Output:
As we can see in the output, the function returned an Index object, containing the date values present in each record of the DatetimeIndex object.
Example # 2: Use the DatetimeIndex.date
attribute to find the date portion of the DatetimeIndex object.
|
Output:
Now we want to find all the and the dates present in the DatetimeIndex object.
|
Output:
As we can see in the output, the function returned an Index object containing the date values present in each object record DatetimeIndex.