python - JSON data to Pandas DataFrame -


help have json file , can't load in python dataframe. first question should json file? resulting file when chart rendered on web page , end data pulled chrome network inspection.

it seems there code in front not json or not table messing import.

http://pastebin.com/ne4rrrgp

can please help

the below loads file in python

import json pprint import pprint open('data2.json') data_file:     data = json.load(data_file) 

and

pprint(data) 

does print data can't convert pandas dataframe

edit

ok must javascript file think json.

just use pandas.read_json, merely wrapper around json class, can take remote url local filename:

import pandas pd pandas_dataframe = pd.read_json('data2.json') 

hope helps.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -