title: loc function in pandas
body: <p>Can anybody explain why is loc used in python pandas with examples like shown below?</p>
  
  <pre><code>for i in range(0, 2):
    for j in range(0, 3):
      df.loc[(df.Age.isnull()) &amp; (df.Gender == i) &amp; (df.Pclass == j+1),
              'AgeFill'] = median_ages[i,j]
  </code></pre>