Question: df 1 = pd . DataFrame ( { key : [ b , b , a ,

df1= pd.DataFrame({"key": ["b","b","a","c","a","a","b"],
"data1": pd.Series(range(7), dtype="Int64")})
df1
df2= pd.DataFrame({"key": ["a","b","d"],
"data2": pd.Series(range(3), dtype="Int64")})
df2
join df1 and df2 use "merge"function
apply outer join of df1 and df2
apply right join of df1 and df2
apply left join of df1 and df2
appy inner join of df1 and df2

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!