title: How can I access the data using pandas .sample() method in Pandas?
body: <p>I'm using the pandas sample method to sample a random students from a list of students. The idea is that I want to &quot;cold call&quot; students and record how many times they are cold called. So I read a csv file, run my python script, then record the csv when the class is over with updated number of student cold calls.</p>
  <p>The df &quot;data&quot; has the columns &quot;Name&quot; and &quot;Num&quot; and I plan recording the number of times a students gets selected. Looks something like this</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Name</th>
  <th>Num</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>John Snow</td>
  <td>1</td>
  </tr>
  <tr>
  <td>Arya Stark</td>
  <td>0</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>The issue I'm having is how to extract the name as a string, as it seems the output is a pandas series object... This is what I see.</p>
  <pre><code>In[37]: samp.Name
  Out[37]: 
  19    John Snow
  Name: Name, dtype: object
  </code></pre>
  <p>I would have expected <code>samp.Name</code> to return the name as a string, but it doesn't... basically I want to do something like</p>
  <pre><code>CurrentName = samp.Name
  print(&quot;Name: {}&quot;.format(CurrentName))
  Name: John Snow
  </code></pre>
  <p>Any help appreciated! happy to answer more question and open to other ideas of doing this. Thanks!</p>