Question: 329 Tools Window Help a. Program 2 (6).pdf (page 1 of 3) v Program 2 Python Data Processing Reference: Chapters 3-6 of the textbook, reference
329 Tools Window Help a. Program 2 (6).pdf (page 1 of 3) v Program 2 Python Data Processing Reference: Chapters 3-6 of the textbook, reference code on CSV files, lectures, Program2Start.py Data files (Quarterbacks.csv and NBA.csv) come from these web sources: http://www.footballdb.com/stats/stats.html https://basketball.realgm.comba/stats As usual, we discuss program details mainly in class and also at lab. We give help during office hours. PART I (10 points) Write a function player stats (csv_data file) that takes as parameter a csv file and returns a dictionary of the data, organized as a dictionary of dictionaries. The keys of the outer dictionary are the player's names. Then each player's statistics are in his own dictionary, with stats name as keys and stats values as values. This is an example of some key-value pairs in the nested dictionaries constructed for the first data file: players1 - player_ stats('Quarterbacks.csv) for player in players1.items(): print(player) ('Andy Dalton', f('Pct of Completions': 61.3, 'Completions': 57.0, 'Att per Game': 31.0, 'Yards': 606.0, Touch Downs': 2.0, 'Attempts': 93.0, 'Interceptions': 4.0 Team: 'CIN') ('Carson Palmer', ['Pct of Completions': 56.8, 'Completions':75.0, 'Att per Game': 44.0, Yards': 925.0, Touch Downs': 4.0, Attempts': 132.0, 'Interceptions: 4.0 Team: 'ARI ('Alex Smith', ['Pct of Completions': 77.4, 'Completions': 65.0, 'Att per Game 28.0, 'Yards': 774.0. "Touch Downs':0. Attempts": 840,'Interceptions': 0.0, Team: 'KC)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
