Back Navigation Next Navigation Pandas (page 8 of 9)

We can join or combine DataFrames by doing on of the following:

1. df1.append(df2)— add the rows in df1 to the end of df2 (columns should be identical)
2. df.concat([df1, df2], axis=1) — add the columns in df1 to the end of df2 (rows should be identical)
3. df1.join(df2, on=col1, how='inner') — SQL-style join the columns in df1 with the columns on df2 where the rows for col have identical values. The how (join type) can be equal to one of: 'left', 'right', 'outer', 'inner'

Pandas SQL Style Joins