I have a dataframe and most of the columns 'arr' have a date correctly formatted as
yyyy-mm-dd
A few bad records have a
/
in them such as 2019/02/10 and I want to drop them.
I tried this:
ttdf = ttdf[ttdf['arr'].map(lambda x: 0 if '/' in x else 1 ) ]
But I got an error message:
KeyError: '[1 1 1 ... 0 0 0] not in index'
Am I on the right track here?