I have two Series and one function which depends of two variables:
import pandas as pd
solar_radiation = pd.Series([0,0,0,0,100,300,500,400,300,200,0])
velocity = pd.Series([10,20,5,3,2,1,3,10,3,4,1])
def Pasqul_stability(solar_radiation,velocity):
if solar_radiation<1:
return "stable"
elif solar_radiation>1 and solar_radiation<350 and velocity>5:
return "stable"
elif solar_radiation>350 and solar_radiation<750 and velocity>6:
return "stable"
else:
return "unstable"
I want to get one series after function:
stablity = ['stable','stable','stable','stable','unstable','unstable','unstable','unstable','unstable','stable']
when I try to use
stablity=Pasqul_stability(solar_radiation,velocity)
I get an error. How should I solve my problem?