for i in data['test preparation course']: if i == 'none': i = None
here, I'm trying to convert 'none' string with None values in python, and it went well.
I just want to activate the changes on the dataset
for i in data['test preparation course']: if i == 'none': i = None
here, I'm trying to convert 'none' string with None values in python, and it went well.
I just want to activate the changes on the dataset
Instead, use pandas.Series.replace
function:
data['test preparation course'].replace('none', None, inplace=True)