Python Forum

Full Version: Merge 2 dataframes but avoid double summing of rows?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I am merging 2 dataframes (DF1 and DF2) with many to many relationships.
The merge works fine but the result duplicates the "Amount" values in every row. How can I avoid this?

[DF3 = pd.merge(DF1,DF2, on=['Project No'],how='left',suffixes=('_left','_right'))]

Any help would be great. Thanks

P.S - Not sure how to attach a sample workbook (excel)