I have this dataframe (relevant here is the Multiindex):
VAL
FINT ID
2021-07-01 00:00:00 C7 32.0
C6 38.0
C5 94.0
2021-07-01 12:00:00 C7 28.0
C6 34.0
C5 95.0
2021-07-02 00:00:00 C7 29.0
C6 33.0
C5 22.1
2021-07-02 12:00:00 C7 29.0
C6 33.0
C5 62.2
...
I want to create a new dataframe selecting data for hour at 12. I wanted to use query for this, but I don't know how to select the hour inside the query selection. I mean, I am searching something like
df.query('FINT.hour == 12')
which it doesn't work (while something like df.query('ID=="C7"') works well). I am using pandas 1.2.4. Thx.