-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Crash when pd.to_datetime
gets a None for certain values of format
#30011
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
Comments
Output from my machine: import pandas as pd |
This error seems to be in newer versions of pandas . NaT is present in pandas version < 0.24 whereas the TypeError/ValueError comes in versions > 0.24. |
…s for pandas versions > 0.24 Closes pandas-dev#30011
…s for pandas versions > 0.24 Closes pandas-dev#30011
…s for pandas versions > 0.24 closes pandas-dev#30011
…s for pandas versions > 0.24 closes pandas-dev#30011
…s for pandas versions > 0.24 closes pandas-dev#30011
…s pandas versions > 0.24. Closes pandas-dev#30011
…s pandas versions > 0.24. Closes pandas-dev#30011
…s pandas versions > 0.24. Closes pandas-dev#30011
…s pandas versions > 0.24. Closes pandas-dev#30011
…s pandas versions > 0.24. Closes pandas-dev#30011
Can someone help in the above commit. My checks are failing and i couldn't figure what are the valid errors. Its failing in linting stage and I couldn't see any stack trace |
Have you taken a look into these |
Thanks @Athul8raj. The links you have shared helped me in solving the linting issues. |
Code Sample
Problem description
When
format
is'%Y%m%d'
,pd.to_datetime
chokes on theNone
, rather than passing it through asNaT
as I would expect and as occurred in a previous version of pandas (I'm not sure which). The error is raised even ifpd.to_datetime
'serrors
argument is set to'ignore'
or'raise'
. Thecache
argument doesn't make a difference, either.Related: #23055
Tracebacks
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: