dask.dataframe.Series.dt.time

dask.dataframe.Series.dt.time#

dataframe.Series.dt.time#

Returns numpy array of datetime.time objects.

This docstring was copied from pandas.core.indexes.accessors.CombinedDatetimelikeProperties.time.

Some inconsistencies with the Dask version may exist.

The time part of the Timestamps.

See also

DatetimeIndex.timetz

Returns numpy array of datetime.time objects with timezones. The time part of the Timestamps.

DatetimeIndex.date

Returns numpy array of python datetime.date objects. Namely, the date part of Timestamps without time and timezone information.

Examples

For Series:

>>> s = pd.Series(["1/1/2020 10:00:00+00:00", "2/1/2020 11:00:00+00:00"])
>>> s = pd.to_datetime(s)
>>> s
0   2020-01-01 10:00:00+00:00
1   2020-02-01 11:00:00+00:00
dtype: datetime64[us, UTC]
>>> s.dt.time
0    10:00:00
1    11:00:00
dtype: object

For DatetimeIndex:

>>> idx = pd.DatetimeIndex(
...     ["1/1/2020 10:00:00+00:00", "2/1/2020 11:00:00+00:00"]
... )
>>> idx.time
array([datetime.time(10, 0), datetime.time(11, 0)], dtype=object)