title: Python - Filtering based on top 5 appearing categorical variable
body: <p>I'm trying to create a new data frame by filtering out the rows with the top 5 most appearing countries and saving it into a new dataframe.</p>
  
  <p>I tried using .nlargest but it doesn't work for categorical data. </p>
  
  <p>Thank you.</p>
  
  <p><a href="https://i.stack.imgur.com/xQNcZ.jpg" rel="nofollow noreferrer">Example of data frame</a></p>