Skip to content

Instantly share code, notes, and snippets.

@pablodz
Created June 28, 2020 22:06
Show Gist options
  • Select an option

  • Save pablodz/fe59fe7535cb86096d997e8638d7ad1f to your computer and use it in GitHub Desktop.

Select an option

Save pablodz/fe59fe7535cb86096d997e8638d7ad1f to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 0,
"metadata": {
"collapsed": false
},
"outputs": [
],
"source": [
"def preprocess(ReviewText):\n",
" ReviewText = ReviewText.str.replace('\\t', ' ')\n",
" ReviewText = ReviewText.str.replace('\\r', ' ')\n",
" ReviewText = ReviewText.str.replace('\\n', ' ')\n",
" return (ReviewText) "
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (system-wide)",
"language": "python",
"metadata": {
"cocalc": {
"description": "Python 3 programming language",
"priority": 100,
"url": "https://www.python.org/"
}
},
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.9"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment