title: saving the label into variable
body: <p>I load data from a csv file. When I try to save the labels column into a variable I am getting the error saying label, and the dataset was taken from <a href="https://www.kaggle.com/c/digit-recognizer/data" rel="nofollow noreferrer">https://www.kaggle.com/c/digit-recognizer/data</a></p>
  
  <pre><code>d0 = pd.read_csv('./test.csv')
  
  print(d0.head(5)) # print first five rows of d0.
  
  # to save the labels into a variable l.
  l = (d0['label'])
  
  got output:
  
     pixel0  pixel1  pixel2  pixel3  pixel4  pixel5  pixel6  pixel7  pixel8  \
  0       0       0       0       0       0       0       0       0       0   
  1       0       0       0       0       0       0       0       0       0   
  2       0       0       0       0       0       0       0       0       0   
  3       0       0       0       0       0       0       0       0       0   
  4       0       0       0       0       0       0       0       0       0   
  
     pixel9    ...     pixel774  pixel775  pixel776  pixel777  pixel778  \
  0       0    ...            0         0         0         0         0   
  1       0    ...            0         0         0         0         0   
  2       0    ...            0         0         0         0         0   
  3       0    ...            0         0         0         0         0   
  4       0    ...            0         0         0         0         0   
  
     pixel779  pixel780  pixel781  pixel782  pixel783  
  0         0         0         0         0         0  
  1         0         0         0         0         0  
  2         0         0         0         0         0  
  3         0         0         0         0         0  
  4         0         0         0         0         0  
  
  [5 rows x 784 columns]
  </code></pre>
  
  <p>I'm getting error </p>
  
  <blockquote>
    <p>KeyError                                  Traceback (most recent call last)
        ~\Anaconda3\lib\site-packages\pandas\core\indexes\base.py in get_loc(self, key, method, tolerance)
           3077             try:
        -> 3078                 return self._engine.get_loc(key)
           3079             except KeyError: 
      KeyError: 'label'<br>
      During handling of the above exception, another exception occurred:</p>
    
    <p>KeyError                                  Traceback (most recent call last)
         in 
             15 
             16 # save the labels into a variable l.
        ---> 17 l = (d0['label'])
             18 
             19 # Drop the label feature and store the pixel data in d.</p>
    
    <p>KeyError: 'label'</p>
  </blockquote>
  
  <p>I cant understand the error described in anaconda</p>
  
  <p>Dropped some error code as stack is showing add more detail error</p>
  
  <p>Please help me on solving this problem</p>