Created
November 27, 2017 18:06
-
-
Save cgoliver/f864a791bb9115b334fa0bfb63902cc2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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