I am trying to merge the following 2 dataframes.
df.head():
x y z w 0 0.0056 11 824 51 1 0.0056 138 546 16 2 0.0056 328 1264 40 3 0.0056 1212 553 91 4 0.0056 1839 388 48 df1.head():
x y z 0 5539.0567 12243 27 1 5873.2923 14474 1540 2 3975.9776 11353 699 3 1508.5975 8250 628 4 66.7913 11812 538 using the following command:
df1 = df1.merge(df, how='left',left_on=(['x','y','z']),right_index=True) and the following error crops up:
ValueError: len(left_on) must equal the number of levels in the index of "right"
In total df has 11458060 rows and df1 has 2528243 rows
I don't really know what this means. Can anyone tell me what I might be doing wrong?