Series.dt.tz_localize(*args, **kwargs) [source]
Localize tz-naive DatetimeIndex to given time zone (using pytz/dateutil), or remove timezone from tz-aware DatetimeIndex
| Parameters: |
tz : string, pytz.timezone, dateutil.tz.tzfile or None Time zone for time. Corresponding timestamps would be converted to time zone of the TimeSeries. None will remove timezone holding local time. ambiguous : ‘infer’, bool-ndarray, ‘NaT’, default ‘raise’
errors : ‘raise’, ‘coerce’, default ‘raise’
New in version 0.19.0. infer_dst : boolean, default False Deprecated since version 0.15.0: Attempt to infer fall dst-transition hours based on order |
|---|---|
| Returns: |
localized : DatetimeIndex |
| Raises: |
TypeError If the DatetimeIndex is tz-aware and tz is not None. |
© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
http://pandas.pydata.org/pandas-docs/version/0.22.0/generated/pandas.Series.dt.tz_localize.html