You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To remove timezone from tz-aware ``DatetimeIndex``, use ``tz_localize(None)`` or ``tz_convert(None)``. ``tz_localize(None)`` will remove timezone holding local time representations. ``tz_convert(None)`` will remove timezone after converting to UTC time.
1528
+
In addition to 'infer', there are several other arguments supported. Passing
1529
+
an array-like of bools or 0s/1s where True represents a DST hour and False a
1530
+
non-DST hour, allows for distinguishing more than one DST
1531
+
transition (e.g., if you have multiple records in a database each with their
1532
+
own DST transition). Or passing 'NaT' will fill in transition times
1533
+
with not-a-time values. These methods are available in the ``DatetimeIndex``
Copy file name to clipboardExpand all lines: doc/source/v0.15.0.txt
+8-2
Original file line number
Diff line number
Diff line change
@@ -346,7 +346,6 @@ API changes
346
346
- ``Series.to_csv()`` now returns a string when ``path=None``, matching the behaviour of
347
347
``DataFrame.to_csv()`` (:issue:`8215`).
348
348
349
-
350
349
.. _whatsnew_0150.index_set_ops:
351
350
352
351
- The Index set operations ``+`` and ``-`` were deprecated in order to provide these for numeric type operations on certain index types. ``+`` can be replace by ``.union()`` or ``|``, and ``-`` by ``.difference()``. Further the method name ``Index.diff()`` is deprecated and can be replaced by ``Index.difference()`` (:issue:`8226`)
@@ -470,6 +469,10 @@ Deprecations
470
469
471
470
- The ``convert_dummies`` method has been deprecated in favor of
472
471
``get_dummies`` (:issue:`8140`)
472
+
- The ``infer_dst`` argument in ``tz_localize`` will be deprecated in favor of
473
+
``ambiguous`` to allow for more flexibility in dealing with DST transitions.
474
+
Replace ``infer_dst=True`` with ``ambiguous='infer'`` for the same behavior (:issue:`7943`).
475
+
See :ref:`the docs<timeseries.timezone_ambiguous>` for more details.
473
476
474
477
.. _whatsnew_0150.knownissues:
475
478
@@ -548,7 +551,10 @@ Enhancements
548
551
549
552
550
553
551
-
554
+
- ``tz_localize`` now accepts the ``ambiguous`` keyword which allows for passing an array of bools
555
+
indicating whether the date belongs in DST or not, 'NaT' for setting transition times to NaT,
556
+
'infer' for inferring DST/non-DST, and 'raise' (default) for an AmbiguousTimeError to be raised (:issue:`7943`).
557
+
See :ref:`the docs<timeseries.timezone_ambiguous>` for more details.
0 commit comments