I want to add a new column called '2016 Salary ($)' that contains employee pay from a table Salary Paid as a number, to the DataFrame income. I want to strip that number by removing '$'and ','.
But when I am doing this I get the error saying:
'Could not convert string to float'
I try to follow the hint, but it is not working:
income['2016 Salary ($)']= income['SalaryPaid'].str.strip('$').astype(float)
income['2016 Salary ($)'].apply(lambda X:X['Salary Paid'])
income
income['2016 Salary ($)']= income['SalaryPaid'].str.strip('$,').astype(float)