Describe the task
Coerce strings in numeric columns ('Max Incentive Amount Requested', 'Incentive Paid', 'Total Purchase Price (pre-tax)') to numbers by removing white spaces and commas. If the value in the cell is still not numeric after that, user should get an error telling them the row and the column name to fix it.
This method should be generalized to other datasets to convert strings to numeric.
Purpose
To fix common issues in numeric columns that prevent pandas from seeing values as numbers.
Acceptance Criteria
[ ] Commas are removed automatically (e.g. 1, 500 needs to be 1500)
[ ] White spaces are removed automatically (e.g. " 40" needs to be "40")
[ ] An error should come up if a cell value is still not numeric after that with the row index and column name.
Additional context
Since the Vehicle & Industry team area are using excel, the index of the row will be plus 2 since in excel headers are in row 1, and data starts in row 2 while pandas start counting rows at 0 by default.
Describe the task Coerce strings in numeric columns ('Max Incentive Amount Requested', 'Incentive Paid', 'Total Purchase Price (pre-tax)') to numbers by removing white spaces and commas. If the value in the cell is still not numeric after that, user should get an error telling them the row and the column name to fix it.
This method should be generalized to other datasets to convert strings to numeric.
Purpose To fix common issues in numeric columns that prevent pandas from seeing values as numbers.
Acceptance Criteria
1, 500
needs to be1500
)Additional context