Question: Write the code using python Objective: Given the 'budget.csv' file, read the data into a two level nested dictionary. Calculate and write the mean of
Objective: Given the 'budget.csv' file, read the data into a two level nested dictionary. Calculate and write the mean of each row and each column to a new file named 'result.txt Example Dialog: For this data: year 1 year 2 year 3 651000 651000 651000 1100500 950100 340000 740000 780000 800000 person The value of the dictionary should looks like this: ('person 1': ('year l :651000, year 2":651000, year 3":651000, 'person 2: 'year 1':110500, 'year 2":950100,'year 3':340000, person 3*: f'year 1':740000, 'year 2':780000, year 3":800000) The content of 'result.txt' should be: The average of yearl is 830500.0o The average of year2 is 793700.00 The average of year3 is 597000.00 The average of personl is 651000.00 The average of person2 is 796866.67 The average of person 3 is 773333.33
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
