I have a DataFrame called Tabla. I am applying a function (called func11
) to each column which basically is for plotting a specific row against other row (yes, is for plotting a single data point per column).
My question is: how can I pass attribute Series as arguments in my func11
so I can have a better control of the rows to be plotted?
Part of my Tabla is shown below:
G13 G42
RH1_0_i 12.7973 25.3097
RH2_0_i -3.51892 85.2268
RH1_0 6700.17 -8888.33
RH2_0 7613 -7945.33
n1 2.30668e+11 2.23905e+11
n2 2.08436e+11 1.92139e+11
So, basically I want to call func11 with extra arguments like RH1_0_i
or n1
which are Series attributes.
So far my code is:
Tabla.apply(func11)
def func11(x):
plt.plot(x.RH1_0_i,x.n1)
plt.plot(x.RH2_0_i,x.n2)
What I want is:
Tabla.apply(func11,extra_args=(arg1,arg2,arg3,arg4))
def func11(x,extra_args):
plt.plot(x.arg1,x.arg3)
plt.plot(x.arg2,x.arg4)