Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Reference

https://pandas.pydata.org/pandas-docs/stable/merging.html

http://stackoverflow.com/questions/22676081/pandas-the-difference-between-join-and-merge

Comment

  1. You are able to specify (via left_on and right_on) which columns to join in each data frame.

  2. Columns that appear in both data frames but not used in joining are distinguished using suffixes.

   x  y
0  1  5
1  2  4
2  3  3
    x  z
0  10  a
1  20  b
2  30  c

Default Join

Columns (x in this case) appear in both data frames are used for joining.

Loading...

Join on Index

Loading...

Join on Specified Columns

   id  v
0   1  5
1   2  4
2   3  3
   x  y
0  1  a
1  2  b
2  3  c
Loading...

Cartesion/Cross Join

Loading...
Loading...
Loading...
Loading...