subset pandas dataframe by list of index code example Example: filter dataframe with a list of index df[df.index.isin([1,3])]