pandas/concat

Concatenate DataFrames

Concatenate DataFrames along rows or columns

pandas
concat
combine

Command

pd.concat

Explanation

pd.concat() is used to combine multiple DataFrames either row-wise or column-wise.

Examples

Concatenate row-wise

pd.concat([df1, df2])

Concatenate column-wise

pd.concat([df1, df2], axis=1)