You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if _is_not_delimiter(buf[2]) or _is_not_delimiter(buf[5]):
returnNone, None
month = _parse_2digit(buf)
day = _parse_2digit(buf +3)
year = _parse_4digit(buf +6)
reso ='day'
can_swap =1
elif length ==7:
# parsing MM?YYYY dates
if buf[2] == b'.'or _is_not_delimiter(buf[2]):
# we cannot reliably tell whether e.g. 10.2010 is a float
# or a date, thus we refuse to parse it here
returnNone, None
month = _parse_2digit(buf)
year = _parse_4digit(buf +3)
reso ='month'
else:
returnNone, None
some code could be added to deal with cases where buf is of length 8 or 9, and either the date or the month are of length 1
Alternative Solutions
Always warn when using dateutil, but I don't a warning should be necessary here
Additional Context
If we wanted to warn whenever dateutil is called (e.g. #47828), then this'd really simplify the adjustments necessary to the test suite, as a lot of tests could be kept as they are
The text was updated successfully, but these errors were encountered:
Feature Type
Adding new functionality to pandas
Changing existing functionality in pandas
Removing existing functionality in pandas
Problem Description
Currently, a string such as
01-01-2020
is parsed as a delimited date, whereas1-1-2020
is parsed bydateutil
One consequence of this is that warnings about e.g.
dayfirst
aren't shown in the latter case, e.g.:Feature Description
In
pandas/pandas/_libs/tslibs/parsing.pyx
Lines 122 to 173 in 9a2276f
some code could be added to deal with cases where
buf
is of length 8 or 9, and either the date or the month are of length 1Alternative Solutions
Always warn when using
dateutil
, but I don't a warning should be necessary hereAdditional Context
If we wanted to warn whenever
dateutil
is called (e.g. #47828), then this'd really simplify the adjustments necessary to the test suite, as a lot of tests could be kept as they areThe text was updated successfully, but these errors were encountered: