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