maxframe.dataframe.Series.dt.timetz#

Series.dt.timetz#

Returns numpy array of datetime.time objects with timezones.

The time part of the Timestamps.

See also

DatetimeIndex.time

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

DatetimeIndex.tz

Return the timezone.

Examples

For Series:

>>> import maxframe.dataframe as md
>>> s = md.Series(["1/1/2020 10:00:00+00:00", "2/1/2020 11:00:00+00:00"])
>>> s = md.to_datetime(s)
>>> s.execute()
0   2020-01-01 10:00:00+00:00
1   2020-02-01 11:00:00+00:00
dtype: datetime64[us, UTC]
>>> s.dt.timetz.execute()
0    10:00:00+00:00
1    11:00:00+00:00
dtype: object

For DatetimeIndex:

>>> idx = md.DatetimeIndex(
...     ["1/1/2020 10:00:00+00:00", "2/1/2020 11:00:00+00:00"]
... )
>>> idx.timetz.execute()
array([datetime.time(10, 0, tzinfo=datetime.timezone.utc),
datetime.time(11, 0, tzinfo=datetime.timezone.utc)], dtype=object)