Skip to content

Commit

Permalink
Merge pull request #96 from Mithgroth/master
Browse files Browse the repository at this point in the history
Change str.replace() regex to start with r and set regex=True
  • Loading branch information
mrdbourke authored Sep 4, 2024
2 parents 8138e44 + aca6494 commit cf817a6
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 cf817a6

Please sign in to comment.