This page graphically illustrates 15 different ways of combining two related data tables and provides the sample code for doing so in Tableau, SPSS, JMP, Stata, SAS, R, MATLAB, and Python. The sample files are available below.
This table illustrates basic types of joining of flat data sets containing common key variables.
Concatenating (merging without keys)
Adding Rows (without pairing)
Adding Rows (with pairing)