title: Select only a number of rows from a pandas Dataframe based on a condition
body: <p>I'm want to sample n rows from each different value in column named <strong>club</strong></p>
  <p><a href="https://i.stack.imgur.com/KnDcz.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KnDcz.jpg" alt="enter image description here" /></a></p>
  <pre><code>columns = ['long_name','age','dob','height_cm','weight_kg','club']
  teams = ['Real Madrid','FC Barcelona','Chelsea','CA Osasuna','Paris Saint-Germain','FC Bayern München','Atlético Madrid','Manchester City','Liverpool','Hull City']
  playersDataDB = playersData.loc[playersData['club'].isin(teams)][columns]
  playersDataDB.head()
  </code></pre>
  <p>In the code above i have selected my desired colums based on them belonging to the teams selected.</p>
  <p>The output from this code is a 299 rows × 6 columns Dataframe meaning that i'm sampling all the player from the team but i want to get just 16 of them from each club.</p>