Skip to content

Instantly share code, notes, and snippets.

@letthedataconfess
Created January 27, 2021 06:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save letthedataconfess/c41c7892b68e7476e2c945b0458d1959 to your computer and use it in GitHub Desktop.
Save letthedataconfess/c41c7892b68e7476e2c945b0458d1959 to your computer and use it in GitHub Desktop.
sentiment analysis
import string
def remove_punc(text):
for i in string.punctuation:
text=text.replace(i,' ')
return text
df.review=df.review.apply(remove_punc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment