I have a CSV that looks like this except obviously bigger. What I need to do is iterate through the whole CSV and assign each individual person to their own dictionary and then create a list of those dictionaries. I've been chipping away at this and I need some guidance and help. Here is what I have so far:
with open('filename.csv', mode ='r') as file:
reader = csv.reader(file, delimiter = ',')
for row in itertools.islice(lvr, 0, 3):
#here is where I am stuck
So basically this is what is hard for me to figure out:
- How do I take that information and put it in it's own dictionary with keys like 'name', 'address', 'city', 'date', and 'amount'?
- How do you step 3 lines every time?