BCG Interview Question | Hashtags

Question

Given a list of tweets, determine the top 10 most used hashtags. How will you approach this problem?

in progress 0
Dhruv2301 55 years 2 Answers 801 views Great Grand Master 0

Answers ( 2 )

  1. extract all hastags using regex and make a seperate column for it. then we can traverse and use dictionary for storing the hashtag and number of times it has been used

  2. use regular expressions to extract tweets and store them in a sorted list.
    Use a pandas object to convert them into a series and use the value_counts()
    method on a series.

Leave an answer

Browse
Browse