In the Sheet1 and Sheet2, maintain the ABCD four field data, the same matching E and F value of the two fields, and to write the value of matching to F in the Sheet1 E back
CodePudding user response:
Try this line not line
CodePudding user response:
The import numpy as npThe import pandas as pd
Df1=pd. Read_excel (r 'C: \ Users \ Desktop \ test1 XLSX', sheetname='Sheet1')
Df2=pd. Read_excel (r 'C: \ Users \ Desktop \ test1 XLSX', sheetname='Sheet2')
Df=pd merge (df1, df2, how='inner', on=[' A ', 'B', 'C', 'D'])
CodePudding user response:
Can run, but the original form is not matching, also did not create a new form,