Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 714602054988275712,I'm at MK Appartaments in Dobele
- 714600471512670212,"Baana bicycle counter.Today: 9 Same time last week: 7 Trend: ↑28% This year: 60 811 Last year: 802 079 #Helsinki #pyöräily #cycling"
- 714598616703320065,"Just posted a photo @ Moscow, Russia"
- 714593900053180416,We're #hiring! Read about our latest #job opening here: CRM Specialist #lifeinspiringcareers #Moscow #Sales
- 714591942949138434,Just posted a photo @ Kfc
- 714591380660731904,Homeless guide on my festival of tours from locals for locals #открытаякарта. Shot by Alexandr
- 714591338977579009,"Who we are? #edmonton #edm #edmlife #edms #edmlifestyle #edmfamily #edmgirls #edmlov"
- 714600471512670212,#Helsinki #pyöräily #cycling
- 714593900053180416,#hiring! #lifeinspiringcareers #Moscow #Sales
- 714591380660731904,#открытаякарта
- 714591338977579009,#edmonton #edm #edmlife #edms #edmlifestyle #edmfamily #edmgirls #edmlov"
- import pandas as pd
- df1 = pd.read_csv('Turkey_28.csv')
- key_word = df1[['tweetID', 'tweetText']].set_index('tweetID')['tweetText']
- key_word = key_word.dropna().apply(lambda x: eval(x))
- key_word = key_word[key_word.apply(type) == dict]
- #I am lost in this section on how to select the hash keywords?
- def get_key_words(x):
- return pd.Series(x['tweetText'],
- key_word = key_word.apply(get_key_word)
- df2 = pd.concat([coords, df1.set_index('tweetID').reindex(coords.index)], axis=1)
- df2.to_csv('Turkey_key_word.csv', index=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement