Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run the script on a dataframe #7

Open
topekekere opened this issue Oct 11, 2022 · 0 comments
Open

run the script on a dataframe #7

topekekere opened this issue Oct 11, 2022 · 0 comments

Comments

@topekekere
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant