I have a dataset where one columns' integer attributes range from 1 to 99999999.
Using pandas, how do I filter that column to only show the specific columns' attributes between 90000000 and 99999999?
Thank you,
from random import randint data = [ [1, randint(1, 10)], [2, randint(2, 10)], [3, randint(90000000,99999999)], [4, randint(4, 10)], [5, randint(90000000,99999999)] ] df = pd.DataFrame(data, columns=['1', '2']) filtered = df[(df.loc[:, '2'] >= 90000000) & (df.loc[:, '2'] <= 99999999)] print(filtered) >> 1 2 2 3 91196774 4 5 91362223
df[90000000 <= df['columnname'] <= 99999999]