So I have a pandas dataframe that has
print(data['Campaign Name'])
will return
0 something
1 NaN
2 NaN
3 NaN
so I have a code
data.apply(lambda x : data['Event Code'] if data['Campaign Name'].isna() else data['Campaign Name'])
when I apply this function, they return me an error saying
ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
I am not entirely sure how they are ambiguous, as data['Campaign Name'].isna() will return the Series, something like
False
True
True
True
What am I missing?