Question: I need help in this. Please do it perfectly because i need to run on autograder. How i can upload the . csv file? import

I need help in this. Please do it perfectly because i need to run on autograder. How i can upload the .csv file? import pandas as pd import numpy as np import scipy.stats as stats import re nhl_df=pd.read_csv("assets/nhl.csv") cities=pd.read_html("assets/wikipedia_data.html")[1] cities=cities.iloc[:-1,[0,3,5,6,7,8]] def nhl_correlation(): # YOUR CODE HERE raise NotImplementedError() population_by_region =[] # pass in metropolitan area population from cities win_loss_by_region =[] # pass in win/loss ratio from nhl_df in the same order as cities["Metropolitan area"] assert len(population_by_region)== len(win_loss_by_region),"Q1: Your lists must be the same length" assert len(population_by_region)==28,"Q1: There should be 28 teams being analysed for NHL" return stats.pearsonr(population_by_region, win_loss_by_region) For this question, calculate the win/loss ratio's correlation with the population of the city it is in for the NHL using 2018 data. The win/loss ratio should be calculated using the following formula: win/(win+loss).[]: import pandas as pd import numpy as np import scipy.stats as stats import re nhl_df=pd.read_csv("assets/nhl.csv") cities-pd.read_html("assets/wikipedia_data.html")[1] cities-cities. iloc[:-1,[0,3,5,6,7,8]] def nhl_correlation(): # YOUR CODE HERE raise Not ImplementedError() population_by_region =[] # pass in metropolitan area population from cities win_loss_by_region =[] # pass in win/Loss ratio from nhl_df in the same order as cities ["Metropolitan area"] assert len(population_by_region)== len(win_loss_by_region),"Q1: Your lists must be the same length" assert len(population_by_region)==28,"Q1: There should be 28 teams being analysed for NHL" return stats.pearsonr(population_by_region, win_loss_by_region)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!