I have foll. dataframe:
datetime 2012-01-01 125.5010 2012-01-02 125.5010 2012-01-03 125.5010 2012-02-04 125.5010 2012-02-05 125.5010 2012-02-29 125.5010 2012-02-28 125.5010 2016-01-07 125.5010 2016-01-08 125.5010 2016-02-29 81.6237
I would like to delete all the lines corresponding to February 29, the result is foll. data frame:
datetime 2012-01-01 125.5010 2012-01-02 125.5010 2012-01-03 125.5010 2012-02-04 125.5010 2012-02-05 125.5010 2012-02-28 125.5010 2016-01-07 125.5010 2016-01-08 125.5010
Now I just do it manually:
df.drop(df.index[['2012-02-29']]) . How can I make it so that it works for many years without manually specifying the row index.
source share