I've got an "Age" column, but sometimes NaN values are displayed. I know I can use "fillna" for this purposes but I've tried to define my own function (and learning to do this way) and use applymap to dataframe
no success so far.
Age
69
49
NaN
54
NaN
I've tried
def get_rid_of_nulls(value):
if value == np.nan:
return 'Is Null value'
else:
return value
with this not working either
if value == None
if value isnull
if value == np.na
if value ==''
if value == NaN
if value == 'NaN'
None of the comparisons seems to work. I'm wrong for sure but I'm stuck and I'm very stubborn to use fillna
thanks