Created
May 31, 2018 17:37
-
-
Save nqmetke/257a84f548254e0e8862c4487c3b4e28 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import csv | |
import json | |
user = {} | |
def grab_user_csv(filename): | |
user = {} | |
f = open(filename, 'r') | |
rows = f.read().split('\n') | |
rev_head = rows[0].replace("\"", "").replace("\n", "") | |
rev_content = rows[1].replace("\"", "").replace("\n", "") | |
headers =rev_head.split(',') | |
content = rev_content.split(',') | |
del content[24] | |
del content[21] | |
del content[20] | |
i = 0 | |
for col in headers: | |
user[headers[i]] = content[i] | |
i = i+1 | |
return user | |
#adding other data hereself. | |
#Thunder | |
#Thunder | |
#Thundercats! Hoooooo! | |
def append_data(salary): | |
user = grab_user_csv('data.csv') | |
user = append_data() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment