I'm trying to remove punctuation from the column "text" using this code:
texttweet = pd.read_csv("../input/pfizer-vaccine-tweets/vaccination_tweets.csv")
i = 0
punct = "
"+string.punctuation
for tweet in texttweet['text']:
texttweet['text'][i] = tweet.translate(str.maketrans('', '', punct))
i += 1
texttweet
But I'm getting this message although I'm getting the needed results:
A value is trying to be set on a copy of a slice from a DataFrame
So is it OK to keep my code regardless of the message or should I change something?
question from:https://stackoverflow.com/questions/65640789/how-to-remove-punctuation-from-one-column-of-a-dataframe