Skip to content

Commit 0e0a364

Browse files
Merge pull request #10733 from jorisvandenbossche/doc-to_datetime
DOC: to_datetime outdated example
2 parents 7f820f9 + fb74f18 commit 0e0a364

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

doc/source/timeseries.rst

+3-11
Original file line numberDiff line numberDiff line change
@@ -208,21 +208,13 @@ Pass ``errors='coerce'`` to convert invalid data to ``NaT`` (not a time):
208208
:okexcept:
209209
210210
# this is the default, raise when unparseable
211-
to_datetime(['2009-07-31', 'asd'], errors='raise')
211+
to_datetime(['2009/07/31', 'asd'], errors='raise')
212212
213213
# return the original input when unparseable
214-
to_datetime(['2009-07-31', 'asd'], errors='ignore')
214+
to_datetime(['2009/07/31', 'asd'], errors='ignore')
215215
216216
# return NaT for input when unparseable
217-
to_datetime(['2009-07-31', 'asd'], errors='coerce')
218-
219-
220-
Take care, ``to_datetime`` may not act as you expect on mixed data:
221-
222-
.. ipython:: python
223-
:okexcept:
224-
225-
to_datetime([1, '1'])
217+
to_datetime(['2009/07/31', 'asd'], errors='coerce')
226218
227219
Epoch Timestamps
228220
~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)