below is my sample dataframe.
I need to remove the columns that have an invalid date or time. Therefore rows 3,5,6 should be deleted. I need a way to verify if the date & time columns contain valid date & times.
>Solution :
IIUC, you could use to_datetime method with errors=coerce parameter; then use notna to create a boolean mask to filter df with:
df = df[pd.to_datetime(df['time'], errors='coerce').notna()]
