Hello,
I'm a newby to Python and I want to write a function which imports a CSV file and
returns a dictionary for each subcategory of a column:
other: 6, teacher: 3, services: 2, health: 1
Any advice? Thanks!
Tips, Expertise, Articles and Advice from the Pro's for Your Website or Blog to Succeed
Hello,
I'm a newby to Python and I want to write a function which imports a CSV file and
returns a dictionary for each subcategory of a column:
other: 6, teacher: 3, services: 2, health: 1
Any advice? Thanks!
Hello,
I'm a newby to Python and I want to write a function which imports a CSV file and
returns a dictionary for the index of each subcategory in a column like this:
hockey: 3, Tennis: 54, volleyball: 59.
Any advise on how to adjust my code?
Thanks!
import csv
with open('pythonfile.csv', newline='') as csvfile:
test = csv.reader(csvfile, delimiter=' ', quotechar='|')
for row in pythonfile:
print(', '.join(row))