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
We recently realized that pandas.core.tools.datetimes.guess_datetime_format outputs an incorrect format string "Tue %d %b %Y %H:%M:%S AM" for the datetime "Tue 24 Aug 2021 01:30:48 AM", which otherwise is parseable by dateutil.parser.parse.
Describe the solution you'd like
Since "Tue 24 Aug 2021 01:30:48 AM" is parseable by dateutil.parser.parse and guess_datetime_format is based on that function, it seems reasonable that guess_datetime_format should produce a correct format string when given this example datetime.
API breaking implications
I believe modifying guess_datetime_format to support more formats placeholders should be a backwards compatible change.
…ndas-dev#43901)
Add support for day of week and meridiem placeholders and any
combination of placeholders supported by `strftime` that do not
correspond to a datetime attribute.
davesque
added a commit
to davesque/pandas
that referenced
this issue
Oct 6, 2021
…ndas-dev#43901)
Add support for day of week and meridiem placeholders and any
combination of placeholders supported by `strftime` that do not
correspond to a datetime attribute.
…ndas-dev#43901)
Add support for day of week and meridiem placeholders and any
combination of placeholders supported by `strftime` that do not
correspond to a datetime attribute.
…3901) (#43900)
Add support for day of week and meridiem placeholders and any
combination of placeholders supported by `strftime` that do not
correspond to a datetime attribute.
Is your feature request related to a problem?
We recently realized that
pandas.core.tools.datetimes.guess_datetime_format
outputs an incorrect format string"Tue %d %b %Y %H:%M:%S AM"
for the datetime"Tue 24 Aug 2021 01:30:48 AM"
, which otherwise is parseable bydateutil.parser.parse
.Describe the solution you'd like
Since
"Tue 24 Aug 2021 01:30:48 AM"
is parseable bydateutil.parser.parse
andguess_datetime_format
is based on that function, it seems reasonable thatguess_datetime_format
should produce a correct format string when given this example datetime.API breaking implications
I believe modifying
guess_datetime_format
to support more formats placeholders should be a backwards compatible change.Describe alternatives you've considered
Not sure that there are any.
Additional context
I already have a PR up for this here: #43900
The text was updated successfully, but these errors were encountered: