title: Sort by ignoring the first column and whitespace in csv file in Python
body: <p>I have a csv file which I want to sort by taking each row at a time. While sorting the row, I want to ignore the whitespace (or empty cell). Also, I want to ignore the first row and first column while sorting. 
  This is how my code looks like:</p>
  
  <pre><code>import csv, sys, operator
  fname = "Source.csv"
  new_fname = "Dest.csv"
  
  data = csv.reader(open(fname,"rb"),delimiter=',') 
  
  num = 1
  sortedlist = []
  ind=0
  for row in data:
      if num==1:
          sortedlist.append(row)
          with open(new_fname,"wb") as f:
              filewriter = csv.writer(f,delimiter=",")
              filewriter.writerow(sortedlist[ind])
              ind+=1
     elif num &gt; 1:            
         sortedlist.append(sorted(row))
         with open(new_fname,"ab") as f:
             filewriter = csv.writer(f,delimiter=",")
             filewriter.writerow(sortedlist[ind])
         ind+=1
         num+=1
  </code></pre>
  
  <p>I was able to ignore the first row. But, I am not sure how to ignore the whitespace and the first column while sorting. Any suggestions are welcome. </p>