python
data_error
ai_generated
true
ValueError: time data '2024-13-45' does not match format '%Y-%m-%d'
ID: python/pandas-parse-dates-error
80%Fix Rate
87%Confidence
0Evidence
2024-06-03First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.x | active | — | — | — |
Root Cause
Date string is invalid (month/day out of range) or format string incorrect.
generic中文
日期字符串无效(月/日超出范围)或格式字符串不正确。
Workarounds
-
95% success
pd.to_datetime(s, errors='coerce') then inspect s.isna()
-
85% success
pd.to_datetime(s, format='mixed', dayfirst=False)
Dead Ends
Common approaches that don't work:
-
75% fail
Silently drops data; root data quality issue persists
-
85% fail
Produces wrong dates for valid rows