Saya tahu kesalahan ini umum terjadi, saya mencoba beberapa solusi yang saya cari dan masih tidak mengerti apa yang salah. Saya kira ini karena bentuk baris dan baris1 yang bisa berubah, tetapi saya tidak dapat memahaminya
Apa yang saya coba lakukan? Saya memiliki 2 kerangka data. Saya perlu mengulangi baris 1 pertama, dan untuk setiap baris baris pertama mengulangi baris kedua dan memeriksa nilai sel untuk beberapa kolom. Kode saya dan upaya berbeda:
a=0
b=0
for row in Correction.iterrows():
b+=1
for row1 in dataframe.iterrows():
c+=1
a=0
print('Handling correction '+str(b)+' and deal '+str(c))
if (Correction.loc[row,['BO Branch Code']]==dataframe.loc[row1,['wings Branch']] and Correction.loc[row,['Profit Center']]==dataframe.loc[row1,['Profit Center']] and Correction.loc[row,['Back Office']]==dataframe.loc[row1,['Back Office']]
and Correction.loc[row,['BO System Code']]==dataframe.loc[row1,['BO System Code']]):
Saya juga mencoba
a=0
b=0
for row in Correction.iterrows():
b+=1
for row1 in dataframe.iterrows():
c+=1
a=0
print('Handling correction '+str(b)+' and deal '+str(c))
if (Correction[row]['BO Branch Code']==dataframe[row1]['wings Branch'] and Correction[row]['Profit Center']==dataframe[row1]['Profit Center'] and Correction[row]['Back Office']==dataframe[row1]['Back Office']
and Correction[row]['BO System Code']==dataframe[row1]['BO System Code']):
Dan
a=0
b=0
for row in Correction.iterrows():
b+=1
for row1 in dataframe.iterrows():
c+=1
a=0
print('Handling correction '+str(b)+' and deal '+str(c))
if (Correction.loc[row,['BO Branch Code']]==dataframe[row1,['wings Branch']] and Correction[row,['Profit Center']]==dataframe[row1,['Profit Center']] and Correction[row,['Back Office']]==dataframe[row1,['Back Office']]
and Correction[row,['BO System Code']]==dataframe[row1,['BO System Code']]):