Skip to content

Commit 0925e56

Browse files
committed
flip cache flag to True; changed to_dateime docstring
1 parent 2fd52d0 commit 0925e56

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

doc/source/whatsnew/v0.25.0.rst

+1
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ Other API Changes
219219
- Comparing :class:`Timestamp` with unsupported objects now returns :py:obj:`NotImplemented` instead of raising ``TypeError``. This implies that unsupported rich comparisons are delegated to the other object, and are now consistent with Python 3 behavior for ``datetime`` objects (:issue:`24011`)
220220
- Bug in :meth:`DatetimeIndex.snap` which didn't preserving the ``name`` of the input :class:`Index` (:issue:`25575`)
221221
- Added ``cache_dates`` parameter to :meth:`read_csv`, which allows to cache unique dates when they are parsed (:issue:`25990`)
222+
Changed default value of `cache` parameter in :meth:`to_datetime` from False to True
222223

223224
.. _whatsnew_0250.deprecations:
224225

pandas/core/tools/datetimes.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ def _adjust_to_origin(arg, origin, unit):
402402
def to_datetime(arg, errors='raise', dayfirst=False, yearfirst=False,
403403
utc=None, box=True, format=None, exact=True,
404404
unit=None, infer_datetime_format=False, origin='unix',
405-
cache=False):
405+
cache=True):
406406
"""
407407
Convert argument to datetime.
408408
@@ -483,12 +483,12 @@ def to_datetime(arg, errors='raise', dayfirst=False, yearfirst=False,
483483
origin.
484484
485485
.. versionadded:: 0.20.0
486-
cache : boolean, default False
486+
cache : boolean, default True
487487
If True, use a cache of unique, converted dates to apply the datetime
488488
conversion. May produce significant speed-up when parsing duplicate
489489
date strings, especially ones with timezone offsets.
490490
491-
.. versionadded:: 0.23.0
491+
.. versionchanged:: 0.25.0
492492
493493
Returns
494494
-------

0 commit comments

Comments
 (0)