import pandas as pd df = pd.read_csv('SIS.csv') class Group: def __init__(self, age): self.__age = age def The_pirates(self, age): self.pirates = pirates[] def The_bulls(self, age) self.bulls = bulls[] def The_yankees(self, age) self.yankees = yankees[] def get_age(self, age): for i in df if df[i][3] > 14 and df[i][3] < 18: pirates.append(__age) print("Creating a database for the pirates") df.DataFrame(pirates) if df[i][3]>= 18 and df[i][3] < 22: yankees.append(__age) print("Creating a database for the yankees") df.DataFrame(yankees) if df[i][3]>= 22 and df[i][3] < 25: bulls.append(__age) print("Creating a database for the bulls") df.DataFrame(bulls) else: print("Sorry but you are not in a group, try agaibn later") your_age = Group() your_age.get_age(input("Hello, Please Input your age: "))