Aan de slagGa gratis aan de slag

Dealing with stray characters (I)

In this exercise, you will work with the RawSalary column of so_survey_df which contains the wages of the respondents along with the currency symbols and commas, such as $42,000. When importing data from Microsoft Excel, more often that not you will come across data in this form.

Deze oefening maakt deel uit van de cursus

Feature Engineering for Machine Learning in Python

Cursus bekijken

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Remove the commas in the column
so_survey_df['RawSalary'] = so_survey_df['RawSalary'].____(',', '')
Code bewerken en uitvoeren