Home > other >  Consult a great god, and how to match the data in python
Consult a great god, and how to match the data in python

Time:09-20


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 np
The 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,
  • Related