mehranshakarami / AI_Spectrum

155 stars 104 forks source link

run the script on a dataframe #7

Open topekekere opened 1 year ago

topekekere commented 1 year ago

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)`