pandas.DatetimeIndex.tz_convert

pandas 3.1.1 · Index objects · method

Express timezone-aware data in another zone while keeping the same instants.

Call syntax

DatetimeIndex.tz_convert(tz)

Run the example

Edit the example and select Run Python to see the result.

Parameters

ParameterRequirementAccepted values and behavior
tz Required
Positional or keyword
str, zoneinfo.ZoneInfo, pytz.timezone, dateutil.tz.tzfile, datetime.tzinfo or None

Supply a timezone name or timezone object.

Returns

Array or Index