Trying to create the new column in my dataframe based on the below condition:
dataFrame01['final'] = dataFrame01.apply(lambda x: x['Name'] if x['Eval'] == 'NAN' else x['Eval'], axis=1)
but every time only ELSE block is getting executed I mean values from else condition as getting populated but not from IF conditions.
Please help and let me know what mistake I am doing here.
pandasquestion, and it has nothing to do withmachine-learning- kindly do not spam irrelevant tags (removed).NANornp.nan? Also check for leading/trailing white spaces.