Join Types
Control which rows are kept when merging with the how parameter.
Inner Join (Default)
Keep only rows that match in both DataFrames:
Loading Pandas Playground...
Left Join
Keep all rows from left, match from right:
Loading Pandas Playground...
Right Join
Keep all rows from right, match from left:
Loading Pandas Playground...
Outer Join
Keep all rows from both DataFrames:
Loading Pandas Playground...
Comparison of All Join Types
Loading Pandas Playground...
Cross Join
Every row paired with every other row:
Loading Pandas Playground...
Exercise: Left Join
Loading Exercise...
Exercise: Outer Join
Loading Exercise...
Key Points
how='inner'- only matching rows (default)how='left'- all from left, matching from righthow='right'- all from right, matching from lefthow='outer'- all rows from bothhow='cross'- all combinations (cartesian product)- Unmatched values become NaN
التالي · الدرس 30 من 42
Handling Duplicates
قراءة 1 دقيقة
أنهيت 29 من 42 درسًا

اسأل Byte عن هذا الدرس
محادثة خاصة حول هذا الدرس. قرأ Byte الدرس كاملًا، ويجيب خلال ثوانٍ، ويُظهر القسم الذي تأتي منه كل إجابة. يمكنك السؤال بأي لغة.
الأسئلة والأجوبة
أسئلة عامة حول هذا الدرس. يجيب AI Tutor فورًا بلغتك، ويراجع فريق FreeAcademy الإجابات، ويمكن لكل المتعلمين قراءتها.

