title: count multiple tabs tsv file
body: <p>I'm trying to parse a huge tab limited file (tsv file) and convert it into comma separated value file. 
  The issue I'm having is that not all entries in the tsv file are complete and some of them are left incomplete and denoted by more than one tab spacing between the entries. Now when I'm converting this into csv file, I want "n.a" in between them indicating the absence of any entry in that field of the record. </p>
  
  <p>For example, consider the student record sample(1 tab = 4 spaces, bear with my poor formatting)</p>
  
  <pre><code>Name    Age    Department    GPA
  Kevin    21    Computer Science    3.4
  Tom    20        3.8
  Kelsey    22    Psychology        (2 tab spaces here)
  </code></pre>
  
  <p>In the above example the first record indicates the field title and every row is a record. 
  We can observe that the 'Department' field entry is missing for Tom and 'GPA' field entry is missing for Kelsey. 
  My output should be something like this: </p>
  
  <pre><code>"Name","Age","Department","GPA"
  "Kevin","21","Computer Science","3.4"
  "Tom","20","n.a","3.8"
  "Kelsey","22","Psychology","n.a"
  </code></pre>
  
  <p>My Questions:<br>
  1) How can I resolve this issue? Python, java, bash, awk any script would do<br>
  2) Observe that the space between the words "Computer" &amp; "Science" in the 2nd row under 'department' field is ignored and preserved. So the resulting script shouldn't be counting spaces. </p>
  
  <p>Doing this perfectly is very important since I would be feeding the data for search indexing. Thanks in advance.</p>