@@ -30,12 +30,10 @@ def _lexer_split_from_str(dt_str):
30
30
# The StringIO(str(_)) is for dateutil 2.2 compatibility
31
31
return _timelex .split (compat .StringIO (str (dt_str )))
32
32
33
-
34
33
_DATEUTIL_LEXER_SPLIT = _lexer_split_from_str
35
34
except (ImportError , AttributeError ):
36
35
pass
37
36
38
-
39
37
def _infer_tzinfo (start , end ):
40
38
def _infer (a , b ):
41
39
tz = a .tzinfo
@@ -52,7 +50,6 @@ def _infer(a, b):
52
50
tz = _infer (end , start )
53
51
return tz
54
52
55
-
56
53
def _guess_datetime_format (dt_str , dayfirst = False ,
57
54
dt_str_parse = compat .parse_date ,
58
55
dt_str_split = _DATEUTIL_LEXER_SPLIT ):
@@ -269,11 +266,13 @@ def to_datetime(arg, errors='raise', dayfirst=False, yearfirst=False,
269
266
1 2016-03-05
270
267
dtype: datetime64[ns]
271
268
272
- Since pandas represents timestamps in nanosecond resolution, the timespan that can be represented using a 64-bit
273
- integer is limited to approximately 584 years.
274
- If a date that does not meet timestamp limitations, passing errors='ignore' will simply return the original input
275
- instead of raising any exception.
276
- Passing errors='coerce' will force to NaT. Furthermore this will force non-dates to NaT as well.
269
+ Since pandas represents timestamps in nanosecond resolution, the timespan
270
+ that can be represented using a 64-bit integer is limited to approximately
271
+ 584 years.
272
+ If a date that does not meet timestamp limitations, passing errors='ignore'
273
+ will simply return the original input instead of raising any exception.
274
+ Passing errors='coerce' will force to NaT. Furthermore this will force
275
+ non-dates to NaT as well.
277
276
278
277
>>> pd.to_datetime('13000101', format='%Y%m%d', errors='ignore')
279
278
datetime.datetime(1300, 1, 1, 0, 0)
0 commit comments