Given the following two DataFrames
:
df1
unicorn size
0 blue 3
1 red 4
2 piNk 6
df2
unicorn size
0 blue 1
1 red 2
How can I apply the rows of both dataframes column-wise using custom functions like this (simplified):
def some_operation(a, b):
return # some operations
Expected result:
size A size B. result
0 3. 1. 3
1. 3. 2. 6
2 4. 1. 4
3. 4. 2. 8
4 6. 1. 6
5. 6. 2. 12