I am trying to convert a SQL query to equivalent python pandas. My data for SQL is
x=(2.2,2.2,2.2,2.2,2.2)
y=(3.3,3.3,3.3,3.3,3.3)
z=(4.4,4.4,4.4,4.4,4.4)
r=(5.5,5.5,5.5,5.5,5.5)
t=(6.6,6.6,6.6,6.6,6.6)
and the SQL query is:
select sum(sum(x),sum(y),sum(z),
sum(r),sum(t)) into :m
from _fx_ght;
I have created Python code to convert the SQL query into pandas:
x=(2.2,2.2,2.2,2.2,2.2)
y=(3.3,3.3,3.3,3.3,3.3)
z=(4.4,4.4,4.4,4.4,4.4)
r=(5.5,5.5,5.5,5.5,5.5)
t=(6.6,6.6,6.6,6.6,6.6)
m=sum(sum(x),sum(y),sum(z),sum(r),sum(t))
print(m)
While executing the code I am getting an error which shows:
Traceback (most recent call last):
File "./prog.py", line 9, in <module>
TypeError: sum() takes at most 2 arguments (5 given)
How can I covert this to the equivalent pandas?