Skip to content

Commit

Permalink
Change str.replace() regex to start with r and set regex=True
Browse files Browse the repository at this point in the history
  • Loading branch information
Mithgroth committed Jul 7, 2024
1 parent 14e48b3 commit aca6494
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,7 @@
"outputs": [],
"source": [
"# Remove the punctuation from price column\n",
"car_sales[\"Price\"] = car_sales[\"Price\"].str.replace(\"[\\$\\,\\.]\", \"\")"
"car_sales[\"Price\"] = car_sales[\"Price\"].str.replace(r\"[\\$\\,\\.]\", \"\", regex=True)"
]
},
{
Expand Down

0 comments on commit aca6494

Please sign in to comment.