I am writing some python code to practice for an exam in January. I need to read the second column into my code and print it out. If possible i also need to add data to specific columns.
The code i have tried is:
def view_this_weeks_sales(): #name of function
with open('employees-names1.csv ') as data: #name of csv filereader = csv.reader(data)first_column = next(zip(*reader))print first_column
My file is below, it has four columns. Thanks in advance :)
Name of employee,Number of cars sold last week, Number of cars sold this week,Number of cars sold total (all on one line)
1,7,7,14
2,7,8,15
3,9,2,11
4,8,6,14
5,2,9,11
6,4,15,19
Total, ,47,84