Question: Problem 1 . The two files contain records on some of the same people, but there are people in df 1 that are not in

Problem 1. The two files contain records on some of the same people, but there are people in df1 that are not in df2(and vice versa). Your first task is to create a new dataframe called df that contains (1) the columns from both df1 and df2, but (2) only the names that belong to both df1 and df2. Hint: what we're doing here is called an "inner join"; it takes the intersection of values in the "name" column, which is shared in both DataFrames. Take a look at the function pd.merge. There is also more information on DataFrame joining and merging.

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!