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]
Scroll To Top