title: Getting AttributeError: 'str' object has no attribute loc
body: <pre><code>infections = []
  
  for i in range(0, 20):
      read_nii(raw_data.loc[i,'infection_mask'], infections, 'infections')
  </code></pre>
  <p>On executing this code, I am getting AttributeError: 'str' object has no attribute 'loc'.How can I resolve this error?</p>