Challenge: Make the Salary Column Proper
Learn how to combine multiple operations with Pandas.
We'll cover the following
Problem statement
The values in the salary column of the staff
(DataFrame
) are stored as a string. We need to convert it to a numerical format to make calculations.
There are two issues that we need to solve before converting it to a numerical data type.
- We need to remove the “$” sign at the beginning.
- We need to remove the “,” used as the thousands separator.
Get hands-on with 1400+ tech skills courses.