I'd like to convert "Yes"and "No" from column"ServiceLevel" to "1" and "0". This is my code:
mydata['ServiceLevel'].replace(to_replace ='Yes',value = 1,inplace = 'True')
mydata['ServiceLevel'].replace(to_replace ='No', value = 0,inplace = 'True')
mydata['ServiceLevel'].head()
ValueError: For argument "inplace" expected type bool, received type str.
What's this mean? How to correct it?