title: sorting by a custom list in pandas
body: <p>After reading through: <a href="http://pandas.pydata.org/pandas-docs/version/0.13.1/generated/pandas.DataFrame.sort.html">http://pandas.pydata.org/pandas-docs/version/0.13.1/generated/pandas.DataFrame.sort.html</a></p>
  
  <p>I still can't seem to figure out how to sort a column by a custom list.  Obviously, the default sort is alphabetical.  I'll give an example.  Here is my (very abridged) dataframe:</p>
  
  <pre><code>             Player      Year   Age   Tm     G
  2967     Cedric Hunter   1991    27  CHH     6
  5335     Maurice Baker   2004    25  VAN     7
  13950    Ratko Varda     2001    22  TOT     60
  6141     Ryan Bowen      2009    34  OKC     52
  6169     Adrian Caldwell 1997    31  DAL     81
  </code></pre>
  
  <p>I want to be able to sort by Player, Year and then Tm.  The default sort by Player and Year is fine for me, in normal order.  However, I do not want Team sorted alphabetically b/c I want TOT always at the top.</p>
  
  <p>Here is the list I created:</p>
  
  <pre><code>sorter = ['TOT', 'ATL', 'BOS', 'BRK', 'CHA', 'CHH', 'CHI', 'CLE', 'DAL', 'DEN',
     'DET', 'GSW', 'HOU', 'IND', 'LAC', 'LAL', 'MEM', 'MIA', 'MIL',
     'MIN', 'NJN', 'NOH', 'NOK', 'NOP', 'NYK', 'OKC', 'ORL', 'PHI',
     'PHO', 'POR', 'SAC', 'SAS', 'SEA', 'TOR', 'UTA', 'VAN',
     'WAS', 'WSB']
  </code></pre>
  
  <p>After reading through the link above, I thought this would work but it didn't:</p>
  
  <pre><code>df.sort(['Player', 'Year', 'Tm'], ascending = [True, True, sorter])
  </code></pre>
  
  <p>It still has ATL at the top, meaning that it sorted alphabetically and not according to my custom list.  Any help would really be greatly appreciated, I just can't figure this out.</p>