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!

Schermafbeelding_2021-01-07_om_22_21_47.png

As I read https://www.w3schools.com/python/python_dictionaries.asp I worry that the limitations and restrictions may blow up how you think this works.

I see there are priors on reading CSV files so can you share your code so far and point out where you think the problems are?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.