I need to drop rows where column X value is a datetime.
I have tried this
from pandas.api.types import is_datetime64_any_dtype as is_datetime
indexNames = df[is_datetime(df['Column X'])].index
df.drop(indexNames, inplace=True)
but it returns
KeyError: False
This below doesnt work either (no error)
indexNames = df[df['Column X'] == is_datetime(df['Column X'])].index
I have still values like this datetime.datetime(2016, 6, 29, 8, 24, 19)
Ive found a related question but inversed Pandas delete all rows that are not a 'datetime' type
have you any idea please ?