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 leftjoinlhsframe, rhsframe, columnnames:
return NotImplemented
printWorld data that includes Covid stats:"
covidworlddata leftjoinworlddata, whodata, Country
covidworlddata
Now we can see our country data along with Covid data for each country!
covidworlddata.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
covidworlddatacovidworlddataTotalVaccinations'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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
