Closed
Description
From #10636
When parsing an invalid date, there are some possible different actions to take:
- ignore -> just returning the original value unparsed (
errors='ignore'
) - raise an error (
errors='raise'
) - coerce / convert to NaN (
coerce=True
)
AFAIK, these three options are just three different options and mutually exclusive (or is there somewhere in the codebase an interaction between both?), so they could be controlled by a single keyword.
Having two keyword can make it even confusing what you should expect when combining those two, eg the example of coerce=True and error=raise.
Proposal: add another 'coerce'
option to the errors
keyword that is equivalent to coerce=True
-> this gives the errors
keyword three options: 'ignore'|'raise'|'coerce'