I have a function like as below
def fun1():
do something
....
return df1,df2
def fun2(df1,df2):
...
df3 = df1.merge(df2)
do something
return df3
funcs = [fun1, fun2]
op_data = []
for func in funcs:
op_data = func(*op_data)
But the above works, if I wish to return only df3
. It goes and neatly gets stored in op_data
.
However, what if I want to return df1,df2 and df3
from fun2
.
I wish to access all df1,df2 and df3 after function execution. Currently am able to access only df3
. but how can I access df1
and df2
the same way?