title: pandas: iterating over DataFrame index with loc
body: <p>I can't seem to find the reasoning behind the behaviour of .loc. I know it is label based, so if I iterate over Index object the following minimal example should work. But it doesn't. I googled of course but I need additional explanation from someone who has already got a grip on indexing.</p>
  
  <pre class="lang-py prettyprint-override"><code>import datetime
  import pandas as pd
  
  dict_weekday = {1: 'MON', 2: 'TUE', 3: 'WED', 4: 'THU', 5: 'FRI', 6: 'SAT', 7: 'SUN'}
  df = pd.DataFrame(pd.date_range(datetime.date(2014, 1, 1), datetime.date(2014, 1, 15), freq='D'),   columns=['Date'])
  df['Weekday'] = df['Date'].apply(lambda x: dict_weekday[x.isoweekday()])
  
  for idx in df.index:
      print df.loc[idx, 'Weekday']
  </code></pre>