मैं दो स्तंभों का उपयोग फ्रेम दो पांडा डेटा में शामिल होने की कोशिश कर रहा हूँ:पांडा: विलय (शामिल होने) एकाधिक स्तंभों पर दो डेटा फ्रेम
new_df = pd.merge(A_df, B_df, how='left', left_on='[A_c1,c2]', right_on = '[B_c1,c2]')
लेकिन निम्न त्रुटि मिला:
pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:4164)()
pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:4028)()
pandas/src/hashtable_class_helper.pxi in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:13166)()
pandas/src/hashtable_class_helper.pxi in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:13120)()
KeyError: '[B_1, c2]'
किसी भी विचार ऐसा करने का सही तरीका क्या होना चाहिए? धन्यवाद!
'left_on' और' right_on' की कोशिश करें, एक स्ट्रिंग है एक सूची की तरह लग रहा स्ट्रिंग की एक सूची नहीं होना चाहिए। – root