title: sorting csv file with python
body: <p>I am trying to sort a csv file by column. The file has many columns and looks like:</p>
  
  <blockquote>
    <p>Tom,01AA01,234.56,334</p>
    
    <p>Alice,01AS01,546.09,3434.3</p>
    
    <p>Sam,01NA01,4574.3,65.45</p>
    
    <p>Joy,01BA01,2897.03,455</p>
    
    <p>Pam,01MA01,434.034,454</p>
    
    <p>John,01AA02,343,24</p>
    
    <p>Alice,01AS02,454,454.54</p>
    
    <p>Tom,02BA01,3434,3454.2</p>
  </blockquote>
  
  <p>And it continues for about 20 columns and 250 rows.</p>
  
  <p>I want it to be sorted by the second column and ordered alphabetically for <code>AA</code>, <code>AS</code>, <code>BA</code> in the second portion, and numerically for the third section <code>'01', '02', '03',</code> and numerically for the first section <code>'01', '02', '03'</code>. And then create a new csv file from this sort. They are not usually just 6 characters long, others are look like <code>'02BAA', '01MAA', '02NAA'</code> and so on.</p>
  
  <p>So in the end it would hopefully look like this for column 2.</p>
  
  <pre><code>01AA01
  01AS01
  01BA01
  01MA01
  01NA01
  01AA02
  01AS02
  02BA01
  </code></pre>
  
  <p>I'm new to coding and not quite sure how to go about doing this. Thank you in advance.</p>