I have a dataframe with text I tried to run the script on it but running to errors. how would you run the script below to take a twitter text that has been loaded onto a dataframe
`#preprocess tweets
tweet_words = []
for word in tweet.split(' '):
if word.startswith('@') and len(word) > 1:
word = '@user'
elif word.startswith('http'):
word = "http"
tweet_words.append(word)
I have a dataframe with text I tried to run the script on it but running to errors. how would you run the script below to take a twitter text that has been loaded onto a dataframe `#preprocess tweets tweet_words = []
for word in tweet.split(' '): if word.startswith('@') and len(word) > 1: word = '@user' elif word.startswith('http'): word = "http" tweet_words.append(word)
tweet_proc = " ".join(tweet_words)`