Reading Json file as Pandas Dataframe error
<p>I have a Json file as follows. It's a list of dicts. </p>

<pre><code>[{"city": "ab", "trips": 4, "date": "2014-01-25", "value": 4.7, "price": 1.1, "request_date": "2014-06-17", "medium": "iPhone", "%price": 15.4, "type": true, "Weekly_pct": 46.2, "avg_dist": 3.67, "avg_price": 5.0}, {"city": "bc", "trips": 0, "date": "2014-01-29", "value": 5.0, "price": 1.0, "request_date": "2014-05-05", "medium": "Android", "%price": 0.0, "type": false, "weekly_pct": 50.0, "avg_dist": 8.26, "avg_price": 5.0}.....]
</code></pre>

<p>When I read this using this: </p>

<pre><code>data=pd.read_json('dataset.json')
</code></pre>

<p>I get the following error: </p>

<blockquote>
  <p>ValueError: Expected object or value</p>
</blockquote>

<p>I tried this too: </p>

<pre><code>from ast import literal_eval

with open('dataset.json') as f:
    data = literal_eval(f.read())

df = pd.DataFrame(data)
</code></pre>

<p>It gives the following error: </p>

<blockquote>
  <p>ValueError: malformed string</p>
</blockquote>

<p>Edit: </p>

<p>Even Json.loads doesn't work. Tried this: </p>

<pre><code>import json
data=json.loads('dataset.json')
</code></pre>

<blockquote>
  <p>ValueError: No JSON object could be decoded</p>
</blockquote>

<p>The Json file is 13.5MB but it seems to have huge amounts of data. </p>