title: Python CSV writer: writing uneven columns
body: <p>I want to write rows with uneven columns. Below is my code:</p>
  
  <pre><code>import csv
  import json
  
  path = 'E:/Thesis/thesis_get_data'
  outputfile = open('maplight_113.csv', 'w', newline='')
  outputwriter = csv.writer(outputfile)
  
  with open (path + "/" + 'maplight data 113congress.json',"r") as f:
      data = json.load(f)
  
      for bill in data['bills']:
          b = bill.get('measure')
          for organization in bill['organizations']:
              d = organization.get('name')
              f = organization.get('disposition')
              a = (organization.get('catcode'))
  
              outputwriter.writerow([b, d, a, f])
              outputfile.flush();
  </code></pre>
  
  <p>Every "bill.get('measure')" in my data, may have one or more sets of "d, f, a" from "bill['organizations']" associated with it. I would like that each set of "d, f, a" fill additional columns in the same "bill.get('measure')" row.</p>