-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC: read_excel and read_csv have a new date_format parameter, but the format of this is not documented #54285
Comments
Thanks for the report.
Can you provide a reproducible example? |
Ah, so it turns out that my issue with the functionality was that parse_dates=True doesn't do what I expected. The behavior does match the documentation, it was just a bit of a surprise. Passing the name(s) of the date columns into parse_dates does seem to work. |
And indeed, the format of date_format does seem to be strftime, so the original issue can be summarized as "date_format parameter documentation should say that it uses strftime format" |
It also seems to support "ISO8601" and "mixed" like to_datetime. So it could possibly just reference the format in that. It does already link to to_datetime, but in the context of an alternative to use. |
Thanks for reporting this issue. I had a look, and I think you're right about it being a strftime format (I think it should be the same as Would you like to raise a pull request to document this? |
take |
Any chance this could be sign-posted in the current 2.12 docs? |
Pandas version checks
main
hereLocation of the documentation
https://pandas.pydata.org/docs/dev/reference/api/pandas.read_csv.html
https://pandas.pydata.org/docs/dev/reference/api/pandas.read_excel.html
Documentation problem
In pandas 2.0 various data read functions have a new date_format parameter.
However, the documentation doesn't actually say what the format of this is.
I'm assuming it's supposed to be a strftime format, but it doesn't say.
(And separately, my testing suggests it doesn't work - but that's probably due to #44284 )
Suggested fix for documentation
Specify in the documentation what the format of the date_format parameter is.
The text was updated successfully, but these errors were encountered: