"how to filter the dataframe rows of pandas by ""within""/""in""?",b = df[(df['a'] > 1) & (df['a'] < 5)]