Here's the dataframe
I need is if Beat column value is Nan , it should be filled as 0 in the Disease column
if Beat column value is anything except Nan , it should be filled as 1 in the Disease column
What i have tried so far ,
if a['Beat'].value('NaN'):
a['Disease'].fillna(0)
else:
a['Disease'].fillna(1)
Also tried this
if a['Beat']=='NaN':
a['Disease'].fillna(0)
else:
a['Disease'].fillna(1)
Both of them didn't work for me.
