Skip to content

Commit 8469f74

Browse files
DOC: don't teach infer_datetime_format in user_guide (#50334)
* docs: infer_datetime_format() deprecated * docs: changes in deprecation msg Co-authored-by: Shashwat <shashwat>
1 parent ca04349 commit 8469f74

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

doc/source/user_guide/io.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,9 @@ parse_dates : boolean or list of ints or names or list of lists or dict, default
275275
infer_datetime_format : boolean, default ``False``
276276
If ``True`` and parse_dates is enabled for a column, attempt to infer the
277277
datetime format to speed up the processing.
278+
279+
.. deprecated:: 2.0.0
280+
A strict version of this argument is now the default, passing it has no effect.
278281
keep_date_col : boolean, default ``False``
279282
If ``True`` and parse_dates specifies combining multiple columns then keep the
280283
original columns.
@@ -916,12 +919,10 @@ an exception is raised, the next one is tried:
916919

917920
Note that performance-wise, you should try these methods of parsing dates in order:
918921

919-
1. Try to infer the format using ``infer_datetime_format=True`` (see section below).
920-
921-
2. If you know the format, use ``pd.to_datetime()``:
922+
1. If you know the format, use ``pd.to_datetime()``:
922923
``date_parser=lambda x: pd.to_datetime(x, format=...)``.
923924

924-
3. If you have a really non-standard format, use a custom ``date_parser`` function.
925+
2. If you have a really non-standard format, use a custom ``date_parser`` function.
925926
For optimal performance, this should be vectorized, i.e., it should accept arrays
926927
as arguments.
927928

0 commit comments

Comments
 (0)