Question: Complete the function below that takes in two frames and a list of column names. This function should return a new frame that contains the

Complete the function below that takes in two frames and a list of column names. This function should return a new frame
that contains the left outer join between these frames on the specified columns from the LHS.
Hint: Make sure to read the documentation on DataFrame.join() if you are going to use it.
'''
def left_join(lhs_frame, rhs_frame, column_names):
return NotImplemented
print("World data that includes Covid-19 stats:")
covid_world_data = left_join(world_data, who_data, ['Country'])
covid_world_data
'''
Now we can see our country data along with Covid-19 data for each country!
''' covid_world_data.describe()'''
Note that we will likely have rows from our world data that did not match up with the WHO data. To see these, we can just
look for empty values in WHO columns (since a left join would put empty values there).
''' covid_world_data[covid_world_data['Total_Vaccinations'].isnull()]'''
Looking at these results, we can understand why the WHO may not have data on some of them. Some are not technically
countries (like "Antarctica"), some have ambiguous national status (like "Taiwan"), and some are just using different but
valid names (like "United States" vs "United States of America").
As a data scientist, think about ways that you could more efficiently join together these datasets.
Complete the function below that takes in two

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 Programming Questions!