I have got a dataframe with a column of datetime64 type. In this column there are several rows with dates as 1999-09-09 23:59:59 where as they should have actually been represented as missing dates NaT. Somebody just decided to use this particular date to represent the missing data. Now I want these dates to be replaced as NaT (the missing date type for Pandas).
Also if I perform operation on this column with NaTs, like
df['date'] - df['column with missing date']
Does Pandas ignore the missing dates and maintain NaT for those rows or will it throw an error some thing like Null pointer exception in Java.
df.loc[df['date'] == '1999-09-09 23:59:59 ', 'date'] = pd.NaT
work?