title: AttributeError: 'Series' object has no attribute 'Id'
body: <p>I am trying to create a malware classifier and I am experiencing the error </p>
  
  <pre><code> AttributeError: 'Series' object has no attribute 'Id. Not sure of the error.
  
  Traceback (most recent call last):
  File"C:/Users/Afiqmatters/PycharmProjects/MajorProject/feature_extraction.py", line 23, in &lt;module&gt;
  rids = [mids.loc[i].Id for i in rchoice]
   File "C:\Users\Afiqmatters\Miniconda\lib\site-packages\pandas\core\generic.py", line 2744, in __getattr__
  return object.__getattribute__(self, name)
  AttributeError: 'Series' object has no attribute 'Id'
  </code></pre>
  
  <p>Here is the codes I have up to the error.</p>
  
  <pre><code>rs = Random()
  rs.seed(1)
  
  trainLabels = pd.read_csv('trainLabels.csv')
  #print trainLabels
  
  fids = []
  
  opd = pd.DataFrame()
  
  for label in range(1,10):
      mids = trainLabels[trainLabels.Class == label]
      mids = mids.reset_index(drop=True)
  #print mids
  rchoice = [rs.randint(0, len(mids) - 1) for i in range(10)]
  print len
  #print rchoice
  rids = [mids.loc[i].Id for i in rchoice]
  </code></pre>
  
  <p>The error happens at   rids = [mids.loc[i].Id for i in rchoice] and I am not sure of the error. </p>
  
  <p>A sample of what is stored in the trainLabels.csv</p>
  
  <pre><code>Id                                   Class
  0A32eTdBKayjCWhZqDOQ                    2
  </code></pre>