maybe someone could show me what i am doing wrong?
import pandas as pd
import operator
def calculate(A, B):
if (A > 2 and B == True):
Z = A * 10
else:
Z = A * 10000
return Z
df = pd.DataFrame()
df['A'] = 1,2,3,4,5
df['B'] = True,True,False,False,True
df['C'] = calculate(df.A, df.B)
df
**Error:** `ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().`
Thanks a lot! I couldn't find a solution for my problem on stackoverflow. I am total beginner and started coding today. The Solutions provided by other Questions didn't helped me, sorry for double post.