Given these 3 dataframes and the venn diagramm below, one must determine which types of joins are used to get a joined dataframe that represents the venn diagram.
The following image shows the options for merging them. the first two are quite obvious, being inner joins. for the last one the solution states that it is an outer join.
What my question is and what i cannot wrap my head around is, why one would do an outer join. Would that not include the information from students which is not represented in the overlap between it external and staff?
You need to take into account that final_df
joins student_external
and student_staff
, the results of the previous operations:
The inner join would only give you the central region (the intersection of all three sets).