title: Write JSON to parquet file using pyarrow
body: <p>I'm running the following code</p>
  <pre><code>import pyarrow
  import pyarrow.parquet as pq
  import pandas as pd
  import json
  
  parquet_schema = schema = pyarrow.schema(
      [('id', pyarrow.string()),
       ('firstname', pyarrow.string()),
       ('lastname', pyarrow.string())])
  
  
  
  user_json = '{&quot;id&quot; : &quot;id1&quot;, &quot;firstname&quot;: &quot;John&quot;, &quot;lastname&quot;:&quot;Doe&quot;}'
  
  writer = pq.ParquetWriter('user.parquet', schema=parquet_schema)
  
  df = pd.DataFrame.from_dict(json.loads(user_json))
  table = pyarrow.Table.from_pandas(df)
  print(table.schema)
  writer.write_table(table)
  writer.close()
  </code></pre>
  <p>but I&quot;m getting the following error:</p>
  <pre><code>---------------------------------------------------------------------------
  ValueError                                Traceback (most recent call last)
  &lt;ipython-input-14-a427a4cdd392&gt; in &lt;module&gt;()
       15 writer = pq.ParquetWriter('user.parquet', schema=parquet_schema)
       16 
  ---&gt; 17 df = pd.DataFrame.from_dict(json.loads(user_json))
       18 table = pyarrow.Table.from_pandas(df)
       19 print(table.schema)
  
  4 frames
  /usr/local/lib/python3.7/dist-packages/pandas/core/internals/construction.py in extract_index(data)
      385 
      386         if not indexes and not raw_lengths:
  --&gt; 387             raise ValueError(&quot;If using all scalar values, you must pass an index&quot;)
      388 
      389         if have_series:
  
  ValueError: If using all scalar values, you must pass an index
  </code></pre>
  <p>Followed docs and tutorials, but I&quot;m missing something.</p>