Use pd.to_datetime
with parameter errors='coerce'
to make non-dates into NaT
null values. Then you can drop those rows
df['Date'] = pd.to_datetime(df['Date'], errors='coerce')
df = df.dropna(subset=['Date'])
df
Use pd.to_datetime
with parameter errors='coerce'
to make non-dates into NaT
null values. Then you can drop those rows
df['Date'] = pd.to_datetime(df['Date'], errors='coerce')
df = df.dropna(subset=['Date'])
df
For further actions, you may consider blocking this person and/or reporting abuse
Alisher0909 -
Shakil Alam -
mohamed Tayel -
Sanjar Rashidov -
Top comments (0)