import pandas as pd
#initialize dataframe
df = pd.DataFrame({'a': [2, 4, 8, 5], 'b': [2, 0, 9, 7]})
#check if the values of df['a'] are in the range(3,6)
out = df['a'].isin(range(3,6))
#filter dataframe
filtered_df = df[out]
print('Original DataFrame
-------------------
',df)
print('
Filtered DataFrame
-------------------
',filtered_df)