'Lambda function positional argument error
Hi I am trying to calculate a ratio using lambda function.
This is the code.
ratio = lambda w,x,y,z: ((z*1000*y/3600)/1.05506)/((w*35.32)*x)
df32[('Enthalpy vs DB Ratio','btu')]= df32[[('HRSG DB Flow','T/Hr'),
('Gas calorific value','BTU/Scf'),('HRSG HP STEAM Enthalpy','Kj/Kg'),
('HRSG HP STEAM FLOW','T/h')]].apply(ratio)
I am getting
TypeError: () missing 3 required positional arguments: 'x', 'y', and 'z'
can someone please help? Is this formula problem or it is related to the database problem I am working on?
Thanks for your time.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|