Skip to content

Commit c855c4b

Browse files
author
MarcoGorelli
committed
update user guide
1 parent ab53530 commit c855c4b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/source/user_guide/io.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -929,12 +929,12 @@ an exception is raised, the next one is tried:
929929

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

932-
1. If you know the format, use ``pd.to_datetime()``:
933-
``date_parser=lambda x: pd.to_datetime(x, format=...)``.
932+
1. If you know the format, use ``date_format``, e.g.:
933+
``date_format="%d/%m/%Y"``.
934934

935-
2. If you have a really non-standard format, use a custom ``date_parser`` function.
936-
For optimal performance, this should be vectorized, i.e., it should accept arrays
937-
as arguments.
935+
2. If you different formats for different columns, or want to pass any extra options (such
936+
as ``utc``) to ``to_datetime``, then you should read in your data as ``object`` dtype, and
937+
then use ``to_datetime``.
938938

939939

940940
.. ipython:: python

0 commit comments

Comments
 (0)