title: write list of paragraph tuples to a csv file
body: <p>The following code is designed to write a tuple, each containing a large paragraph of text, and 2 identifiers behind them, to a single line per each entry. </p>
  
  <pre><code>import urllib2
  import json
  import csv
  
  base_url = "https://www.eventbriteapi.com/v3/events/search/?page={}
  writer = csv.writer(open("./data/events.csv", "a"))
  writer.writerow(["description", "category_id", "subcategory_id"])
  
  def format_event(event):
      return event["description"]["text"].encode("utf-8").rstrip("\n\r"), event["category_id"], event["subcategory_id"]
  
  for x in range(1, 2):
      print "fetching page - {}".format(x)
      formatted_url = base_url.format(str(x))
      resp = urllib2.urlopen(formatted_url)
      data = resp.read()
      j_data = json.loads(data)
      events = map(format_event, j_data["events"])
      for event in events:
          #print event
          writer.writerow(event)
  
      print "wrote out events for page - {}".format(x)
  </code></pre>
  
  <p>The ideal format would be to have each line contain a single paragraph, followed by the other fields listed above, yet here is a screenshot of how the data comes out. </p>
  
  <p><a href="https://i.stack.imgur.com/hmbR5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hmbR5.png" alt="enter image description here"></a></p>
  
  <p>If instead I this line to the following:</p>
  
  <pre><code>writer.writerow([event])
  </code></pre>
  
  <p>Here is how the file now looks:
  <a href="https://i.stack.imgur.com/lmhMm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lmhMm.png" alt="enter image description here"></a></p>
  
  <p>It certainly looks much closer to what I want, but its got parenthesis around each entry which are undesirable. </p>
  
  <p><strong>EDIT</strong>
  <a href="https://gist.github.com/IoDmitri/6bec1ccffa936fe37b3ef72ca6414168" rel="nofollow noreferrer">here</a> is a snippet that contains a sample of the data Im working with.</p>