title: Converting output from API to CSV
body: <p>I am trying to use an API for a platform called "ParseHub". They have sample code to use it in Python but unfortunately I am not the best in Python and I cannot figure out how to save the file as a CSV... Here is the code:</p>
  
  <pre><code>import requests
  
  params = {
    "api_key": "tSKqprcg7k-S",
    "format": "csv"
    }
  r = requests.get('https://www.parsehub.com/api/v2/projects/tq1H9ha1sKAQ/last_ready_run/data', params=params)
  print(r.text)
  </code></pre>
  
  <p>How can I save the output as a CSV or excel file?</p>
  
  <p>Thank you!</p>
  
  <p>Edit: Here is what the output looks like. It's just a ton of rows like this</p>
  
  <pre><code>"132","Adult","2","2018-03-22","99","38","2"
  "151","Adult","2","2018-03-23","99","30","2"
  "152","Adult","2","2018-03-24","99","29","2"
  "138","Adult","2","2018-03-25","99","36","2"
  </code></pre>