Remove all rows between two timestamps from pandas dataframe

Viewed 7623

How to delete all rows from dataframe between two timestamps inclusive?

my Dataframe looks like :

                   b      a      
0 2016-12-02 22:00:00  19.218519 
1 2016-12-02 23:00:00  19.171197  
2 2016-12-03 00:00:00  19.257836  
3 2016-12-03 01:00:00  19.195610  
4 2016-12-03 02:00:00  19.176413 

For eg : I want to delete all rows from above dataframe whose timestamp falls is in between : "2016-12-02 22:00:00" to "2016-12-03 00:00:00". So, the result will contain only rows 3 and 4.

the type of b column is datetime64 and the type of a is float.

Please suggest.

3 Answers
Related