Search code examples
pythondataframestockpandas-resample

Check Dataframe Exactly at 10 min interval starting from 9.15


I am stuck on code , where I want to check dataframe every 10 min starting from 09:15. If I use minute%10=0 then It checks at 9:20 and 9.30 which is not correct.

It should always check at 9.25 and 9.35 till 15.25.

Thanks

Checking at specific interval only once every 10 min.


Solution

  • I am guessing that you are doing current_time % 10 which is causing the problem in logic.

    So, instead of only minute % 10, you will need to do (current_time - start_time).minute % 10