title: pandas sort dataframe by column that includes numbers and letters
body: <p>I need to sort a dataframe by one column, which includes a combination of numbers and letters.</p>
  
  <pre><code>df = [{"user": "seth",
         "name": "1"},
       {"user" : "chris",
         "name": "10A"},
       {"user" : "aaron",
         "name": "4B"},
       {"user" : "dan",
         "name": "10B"}]
  </code></pre>
  
  <p>My code:</p>
  
  <pre><code>df1 = df.sort_values(by=['name'])
  </code></pre>
  
  <p>This gets me:</p>
  
  <pre><code>df1 = [{"user": "seth",
         "name": "1"},
       {"user" : "chris",
         "name": "10A"},
       {"user" : "dan",
         "name": "10B"},
       {"user" : "aaron",
         "name": "4B"}]
  </code></pre>
  
  <p>I want:</p>
  
  <pre><code>df1 =    [{"user": "seth",
             "name": "1"},
           {"user" : "aaron",
             "name": "4B"},
           {"user" : "chris",
             "name": "10A"},
           {"user" : "dan",
             "name": "10B"}]
  </code></pre>
  
  <p>I had a different question that was flagged as a similar question, and their code:</p>
  
  <pre><code>   df.reindex(index=natsorted(df.name))
  </code></pre>
  
  <p>It returns a sorted dataframe, but all values have been replaced by NaNs.</p>
  
  <pre><code>  df.iloc(natsorted(df.name))
  </code></pre>
  
  <p>It raises an error:</p>
  
  <pre><code>TypeError: unhashable type: 'list'
  </code></pre>