Performing a Union With DataFrames

Python

In Pandas we can perform a Union like we do in SQL by using the concat function.

 1|  import pandas as pd
 2|  
 3|  df3 = pd.concat(objs=[df1, df2])
Did you find this snippet useful?

Sign up for free to to add this to your code library