Skip to content

Commit 535d140

Browse files
authored
Merge pull request #23 from Ahtisham-1214/master
Resolve issue #21: now using proper regex format to resolve syntax warning
2 parents 7b872c4 + 2a92d8f commit 535d140

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

1-Data-Cleaning.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,9 @@
286286
"def clean_text_round1(text):\n",
287287
" '''Make text lowercase, remove text in square brackets, remove punctuation and remove words containing numbers.'''\n",
288288
" text = text.lower()\n",
289-
" text = re.sub('\\[.*?\\]', '', text)\n",
290-
" text = re.sub('[%s]' % re.escape(string.punctuation), '', text)\n",
291-
" text = re.sub('\\w*\\d\\w*', '', text)\n",
289+
" text = re.sub(r'\\[.*?\\]', '', text)\n",
290+
" text = re.sub(r'[%s]' % re.escape(string.punctuation), '', text)\n",
291+
" text = re.sub(r'\\w*\\d\\w*', '', text)\n",
292292
" return text\n",
293293
"\n",
294294
"round1 = lambda x: clean_text_round1(x)"
@@ -510,7 +510,7 @@
510510
"name": "python",
511511
"nbconvert_exporter": "python",
512512
"pygments_lexer": "ipython3",
513-
"version": "3.6.2"
513+
"version": "3.12.2"
514514
},
515515
"toc": {
516516
"nav_menu": {},

0 commit comments

Comments
 (0)