I have the following DataFrame with Index Date and ID
V1 V2
Date ID
01.01.2010 1 x y
01.01.2010 2 x y
02.01.2010 1 x y
......
I was able to select a date range with
df.loc[ slice(start, end) ]
But I need to filter data based on a list of ID's. For example
allowed = [1, 5]
df.loc[ allowed ]
How this is possible?