Skip to content

Python code snippet – How to merge two dataframes?

df_outer = pd.merge(df1, df2, on='id', how='outer') #here id is common column

df_outer
See also  Python code snippet - How to import somthing from another directory in pyhon?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.