how to select a row based on the index in code example Example: filter dataframe with a list of index df[df.index.isin([1,3])]