Instantly share code, notes, and snippets.

Embed
What would you like to do?
from mycsv import *
if __name__ == "__main__":
#creating parser object
#these are default values anyway
#passing them explicitly just to show funcionatity
parser = MyCSV(delimiter=",", header=True)
#parsing test file
data = parser.parse("test.csv")
print(f"Columns: {data.columns}")
print("-"*20)
print(f"Attributes: {data.__dict__}")
#get gpa column
print(f"GPA column: {data.gpa}")
print("-"*20)
for row in data.iterrows():
print(row)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment