Queer European MD passionate about IT
Parcourir la source

Merge pull request #119 from dataquestio/bug/bruno/210_2

Refine data cleaning
Bruno il y a 4 ans
Parent
commit
8a9953255a
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      Mission210Solution.ipynb

+ 1 - 0
Mission210Solution.ipynb

@@ -250,6 +250,7 @@
     "def normalize_text(text):\n",
     "    text = text.lower()\n",
     "    text = re.sub(\"[^A-Za-z0-9\\s]\", \"\", text)\n",
+    "    text = re.sub(\"\\s+\", \" \", text)\n",
     "    return text\n",
     "\n",
     "def normalize_values(text):\n",