Created
January 27, 2021 06:37
-
-
Save letthedataconfess/c41c7892b68e7476e2c945b0458d1959 to your computer and use it in GitHub Desktop.
sentiment analysis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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