英文:
Pandas Visual Representation Joining DataFrames
问题
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?
英文:
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?
答案1
得分: 2
你需要考虑 final_df
连接了 student_external
和 student_staff
,这是之前操作的结果:
内连接只会给你中心区域(三个集合的交集)。
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论