pandas 1.4.2

ParametersRaisesReturns

Parameters

tz : str, pytz.timezone, dateutil.tz.tzfile or None

Time zone for time which Timestamp will be converted to. None will remove timezone holding UTC time.

Raises

TypeError

If Timestamp is tz-naive.

Returns

converted : Timestamp

Convert timezone-aware Timestamp to another time zone.

Examples

Create a timestamp object with UTC timezone:

This example is valid syntax, but we were not able to check execution
>>> ts = pd.Timestamp('2020-03-14T15:32:52.192548651', tz='UTC')
... ts Timestamp('2020-03-14 15:32:52.192548651+0000', tz='UTC')

Change to Tokyo timezone:

This example is valid syntax, but we were not able to check execution
>>> ts.tz_convert(tz='Asia/Tokyo')
Timestamp('2020-03-15 00:32:52.192548651+0900', tz='Asia/Tokyo')

Can also use astimezone :

This example is valid syntax, but we were not able to check execution
>>> ts.astimezone(tz='Asia/Tokyo')
Timestamp('2020-03-15 00:32:52.192548651+0900', tz='Asia/Tokyo')

Analogous for pd.NaT :

This example is valid syntax, but we were not able to check execution
>>> pd.NaT.tz_convert(tz='Asia/Tokyo')
NaT
See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: None#None
type: <class 'cython_function_or_method'>
Commit: