pandas.DatetimeTZDtype
- class pandas.DatetimeTZDtype(unit='ns', tz=None)[source]
-
An ExtensionDtype for timezone-aware datetime data.
This is not an actual numpy dtype, but a duck type.
- Parameters
-
- unit:str, default “ns”
-
The precision of the datetime data. Currently limited to
"ns"
. - tz:str, int, or datetime.tzinfo
-
The timezone.
- Raises
-
- pytz.UnknownTimeZoneError
-
When the requested timezone cannot be found.
Examples
>>> pd.DatetimeTZDtype(tz='UTC') datetime64[ns, UTC]
>>> pd.DatetimeTZDtype(tz='dateutil/US/Central') datetime64[ns, tzfile('/usr/share/zoneinfo/US/Central')]
Attributes
The precision of the datetime data.
The timezone.
Methods
None
© 2008–2021, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/1.3.4/reference/api/pandas.DatetimeTZDtype.html