1

How can I drop index 2019-08-01 from my dataFrame called Graph ?

             A            B          C       D           E           F
   Date                     
2019-08-01  0.000000    0.000000    0.000       NaN      NaN            NaN
2019-08-06  97.950000   98.050000   97.850  48.975000   48.975000   48.975000
2019-08-09  97.616667   97.508333   97.725  97.783333   97.783333   97.783333
2019-08-14  97.350000   97.325000   97.375  97.483333   97.483333   97.483333
2019-08-19  95.033333   94.791667   95.275  96.191667   96.191667   96.191667

I have used the below code

Graph=Graph.drop(index='2019-08-01')

And got this error

KeyError: "['2019-08-01'] not found in axis"

1 Answer 1

2

Try concart values to timestamp, because seems here is DatetimeIndex:

Graph=Graph.drop(index=pd.Timestamp('2019-08-01'))
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.