title: Unable to convert JSON file to CSV using Python
body: <p>I was trying to convert the below JSON file into a csv file.</p>
  
  <p>JSON file</p>
  
  <pre><code>[{
  "SubmitID":1, "Worksheet":3, "UserID":65,
   "Q1":"395",
   "Q2":"2178",
   "Q3":"2699",
   "Q4":"1494"},{
   "SubmitID":2, "Worksheet":3, "UserID":65,
    "Q4":"1394"},{
   "SubmitID":3, "Worksheet":4, "UserID":65,
    "Q1":"1629",
    "Q2":"1950",
    "Q3":"0117",
    "Q4":"1816",
   "Empty":" "}]
  </code></pre>
  
  <p>However, my Python code below gives the error message "TypeError: Expected String or Unicode". May I know how should I modify my program to make it work?</p>
  
  <pre><code>import json
  import pandas as pd
  
  f2 = open('temp.json')
  useful_input = json.load(f2)
  df=pd.read_json(useful_input)
  print(df)
  df.to_csv('results.csv')
  </code></pre>