title: sort_values() got an unexpected keyword argument 'by'
body: <pre><code>for i in str_list:   #str_list is a set contain some strings 
      df.loc[i].sort_values(by = 'XXX')
  **TypeError**: sort_values() got an unexpected keyword argument 'by' ".
  &gt;&gt;&gt; type(df.loc[i])
  &gt;&gt;&gt; pandas.core.frame.DataFrame
  </code></pre>
  
  <p>But it works outside the for loop!</p>
  
  <pre><code>df.loc['string'].sort_values(by = 'XXX')
  &gt;&gt;&gt; type(df.loc['string'])
  &gt;&gt;&gt; pandas.core.frame.DataFrame
  </code></pre>
  
  <p>I'm confused.</p>