[Python] How to extract data in a pandas dataframe with specific hour and minute? [closed]

Discussão em 'Python' iniciado por Stack, Julho 6, 2025.

  1. Stack

    Stack Membro Participativo

    The historical stock information of every minute in 2 years is read into a pandas dataframe with datetime as the index as shown below. I want to extract the rows with specific hour and minute, for instance, 09:30:00 every day. How to do it?

    [​IMG]

    I don't care about the date. The only thing is to extract the data corresponding to 09:30:00 every day.

    I want to know how to extract the data in a period as well. For instance, the data from 09:30:00 to 09:35:00.

    Continue reading...

Compartilhe esta Página