I have two Excel sheets, sheet1
, and sheet2
. Sheet1 has the row id
, First name
, Last name
, Description
columns, etc. Sheet2 has also a column that stores the First name
, Last name
, and also two other columns, column D
, and column E
, that need to be merged in the Description column.
The combination of First name
, Last name
, exists only once in both sheets.
How could I merge the contents of column D, E from sheet 2, in column named Description, in sheet 1, based on the matching criteria First name and Last name are equal in row from sheet 1, and from sheet 2, using Python Pandas?
Sheet 1:
ID | columnB | column C | Column D
1 | John | Hingins | Somedescription
Sheet 2:
ID | column Z | column X | Column Y | Column W
1 | John | Hingins | description2 | Somemoredescription
Output: Sheet 1:
ID | columnB | column C | Column D
1 | John | Hingins | description2-separator-Someotherdescription-separator-Somedescription