0

I have to delete rows which has a particular date "2019-10-07" which in the column "date1". Date object is not working with the given code.

I have tried 2 codes but it seems like its not working for my dataframe. I have attached my dataframe below, https://drive.google.com/file/d/1WrIC-ZY1mjKGpGdH9OT83EPzHBcvCUMo/view?usp=sharing

I have been using these codes but its not working

df1.drop(df1.loc[df1['date1']== "2019-10-07"].index, inplace=True)
anadi
  • 63
  • 1
  • 6

1 Answers1

0

Try:

df1 = df1[df1['date1'] != '2019-10-07']

This way you select all the rows that are not '2019-10-07'

ycx
  • 3,155
  • 3
  • 14
  • 26