Hi,
I have a function say
def excelsqrtfile(k):
if(k>0):
result = m.sqrt(x)
print(result)
else:
result = 0
return result
I need to apply this function to a specific column in Excel sheet.
I have a dataframe df
I am calling the function like below.
df1["sqr"]=excelsqrtfile(df1.dummy)
Error:
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
Any Help would be appreciated.
Thanks,