title: Why .loc doesn't work in Python Pandas Series?
body: <p>I get the needed row of date '2013-09-12' with filter. Is it because label 'date' is a label of an indecies and indecies are '2013-09-12' dates. Where '.loc', I believe, is looking at column and row label values. Is my understanding correct?</p>
  
  <pre><code>mean_altitudes_perday = grouped_bydates.altitude.mean()
  
  print(mean_altitudes_perday)
  print(mean_altitudes_perday.loc[mean_altitudes_perday['date']] == '2013-09-12') # Why loc is not working here?
  
  
  # Q: What is the mean altitude of the birds on 2013-09-12?
  # A: print(mean_altitudes_perday.filter(like='2013-09-12', axis=0))
  </code></pre>
  
  <p>Error Message:</p>
  
  <pre><code>date
  2013-08-15    134.092000
  2013-08-16    134.839506
  2013-08-17    147.439024
  2013-08-18    129.608163
  2013-08-19    180.174797
                   ...    
  2014-04-26     15.118012
  2014-04-27     23.897297
  2014-04-28     37.716867
  2014-04-29     19.244792
  2014-04-30     13.954545
  Name: altitude, Length: 259, dtype: float64
  ---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  ~/opt/anaconda3/lib/python3.7/site-packages/pandas/core/indexes/base.py in get_value(self, series, key)
     4410             try:
  -&gt; 4411                 return libindex.get_value_at(s, key)
     4412             except IndexError:
  
  # Had to delete a lot of error code due to posting requirements
  
  KeyError: 'date'
  </code></pre>