Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K

pandas.DatetimeIndex.timetz#

propertyDatetimeIndex.timetz[source]#

Returns numpy array ofdatetime.time objects with timezones.

The time part of the Timestamps.

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)>>>s0   2020-01-01 10:00:00+00:001   2020-02-01 11:00:00+00:00dtype: datetime64[ns, UTC]>>>s.dt.timetz0    10:00:00+00:001    11:00:00+00:00dtype: object

For DatetimeIndex:

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

[8]ページ先頭

©2009-2025 Movatter.jp