![]() |
Merge 2 dataframes but avoid double summing of rows? - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Merge 2 dataframes but avoid double summing of rows? (/thread-27316.html) |
Merge 2 dataframes but avoid double summing of rows? - vinaysalian17 - Jun-03-2020 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) |