MCPcopy Create free account
hub / github.com/apache/arrow / make_tz_aware

Function make_tz_aware

python/pyarrow/pandas_compat.py:1279–1286  ·  view source on GitHub ↗

Make a datetime64 Series timezone-aware for the given tz

(series, tz)

Source from the content-addressed store, hash-verified

1277
1278
1279def make_tz_aware(series, tz):
1280 """
1281 Make a datetime64 Series timezone-aware for the given tz
1282 """
1283 tz = pa.lib.string_to_tzinfo(tz, prefer_zoneinfo=_pandas_api.is_ge_v3())
1284 series = (series.dt.tz_localize('utc')
1285 .dt.tz_convert(tz))
1286 return series

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected