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
According to the api for read_sql, the parse_date argument should be able to contain a dict of dicts with kwargs per column to be passed along to pandas.to_datetime(), as shown in the example above.
However, this will result in the error: TypeError: to_datetime() got multiple values for keyword argument 'errors'
This is because of this line of code: return to_datetime(col, errors="ignore", **format) - where format is our kwargs from that specific column.
Specifically, the hardcoded errors argument collides with the passed kwarg.
It seems like the errors argument cannot be overridden by kwargs in this implementation.
Expected Output
Expect errors arg in to be overridden by the kwargs argument, or that the documentation explicitly says that it cannot be overridden for some reason.
The text was updated successfully, but these errors were encountered:
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
According to the api for read_sql, the
parse_date
argument should be able to contain a dict of dicts with kwargs per column to be passed along topandas.to_datetime()
, as shown in the example above.However, this will result in the error:
TypeError: to_datetime() got multiple values for keyword argument 'errors'
This is because of this line of code:
return to_datetime(col, errors="ignore", **format)
- whereformat
is our kwargs from that specific column.Specifically, the hardcoded
errors
argument collides with the passed kwarg.It seems like the
errors
argument cannot be overridden by kwargs in this implementation.Expected Output
Expect
errors
arg in to be overridden by the kwargs argument, or that the documentation explicitly says that it cannot be overridden for some reason.The text was updated successfully, but these errors were encountered: