From fb74f18ea165154aec4d8af31b1c315a8474fea0 Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Mon, 3 Aug 2015 14:56:47 +0200 Subject: [PATCH] DOC: to_datetime outdated example --- doc/source/timeseries.rst | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/doc/source/timeseries.rst b/doc/source/timeseries.rst index 1b5a4586e59e7..b00b1d2baaac3 100644 --- a/doc/source/timeseries.rst +++ b/doc/source/timeseries.rst @@ -208,21 +208,13 @@ Pass ``errors='coerce'`` to convert invalid data to ``NaT`` (not a time): :okexcept: # this is the default, raise when unparseable - to_datetime(['2009-07-31', 'asd'], errors='raise') + to_datetime(['2009/07/31', 'asd'], errors='raise') # return the original input when unparseable - to_datetime(['2009-07-31', 'asd'], errors='ignore') + to_datetime(['2009/07/31', 'asd'], errors='ignore') # return NaT for input when unparseable - to_datetime(['2009-07-31', 'asd'], errors='coerce') - - -Take care, ``to_datetime`` may not act as you expect on mixed data: - -.. ipython:: python - :okexcept: - - to_datetime([1, '1']) + to_datetime(['2009/07/31', 'asd'], errors='coerce') Epoch Timestamps ~~~~~~~~~~~~~~~~