pandas.DatetimeTZDtype.construct_from_string

classmethod DatetimeTZDtype.construct_from_string(string) [source]

Construct a DatetimeTZDtype from a string.

Parameters:
string : str

The string alias for this DatetimeTZDtype. Should be formatted like datetime64[ns, <tz>], where <tz> is the timezone name.

Examples

>>> DatetimeTZDtype.construct_from_string('datetime64[ns, UTC]')
datetime64[ns, UTC]

© 2008–2012, 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/0.24.2/reference/api/pandas.DatetimeTZDtype.construct_from_string.html