diff --git a/1-Data-Cleaning.ipynb b/1-Data-Cleaning.ipynb index 2689063..9600a52 100644 --- a/1-Data-Cleaning.ipynb +++ b/1-Data-Cleaning.ipynb @@ -284,9 +284,9 @@ "def clean_text_round1(text):\n", " '''Make text lowercase, remove text in square brackets, remove punctuation and remove words containing numbers.'''\n", " text = text.lower()\n", - " text = re.sub('\\[.*?\\]', '', text)\n", - " text = re.sub('[%s]' % re.escape(string.punctuation), '', text)\n", - " text = re.sub('\\w*\\d\\w*', '', text)\n", + " text = re.sub(r'\\[.*?\\]', '', text)\n", + " text = re.sub(r'[%s]' % re.escape(string.punctuation), '', text)\n", + " text = re.sub(r'\\w*\\d\\w*', '', text)\n", " return text\n", "\n", "round1 = lambda x: clean_text_round1(x)" @@ -508,7 +508,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.2" + "version": "3.12.2" }, "toc": { "nav_menu": {},