Skip to content
Advertisement

Dropping rows at specific minutes

I am trying to drop rows at specific minutes ( 05,10, 20 ) I have datetime as an index

JavaScript

enter image description here

Then I run below

JavaScript

it returnes invalid syntax error.

Advertisement

Answer

You can just do it using boolean indexing, assuming that the index is already parsed as datetime.

JavaScript

Or the opposite of the same answer:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement