I am looking to take two csvs (read in through pandas), and combine them into a single 3D DataFrame.
The formats are similar to this:
Table1:
key1 key2 key3 value
x1 y1 z1 1
x1 y2 z1 2
x1 y3 z1 3
x2 y1 z1 4
x2 y2 z1 5
x2 y3 z2 6
x3 y1 z2 7
x3 y2 z2 8
x3 y3 z2 9
Table2:
key2 key3 value x1 x2 x3
y1 z1 0
y2 z1 1
y3 z1 2
y1 z2 3
y2 z2 4
y3 z2 5
My goal is that in table2 the values under the 'x' headers should be a lookup of the value in table1 (using all 3 keys) multiplied by the value in table2.