I have a csv file that I turn into a json so that I can turn it into a panda data-frame.
Here is my code,
def create_png():
f = open('sticks.csv', 'r')
reader = csv.DictReader( f, fieldnames = ("xstk", "stk") )
out = json.dumps( [row for row in reader ] )
print out
df = DataFrame([
#TODO
])
The line 'print out' prints out "[{"xstk": "1", "stk": "0"}, {"xstk": "0", "stk": "1"}, {"xstk": "1", "stk": "0"}]"
So what can I put into #TODO to make the code run and turn this into a simple two column dataframe? I have looked at Create pandas dataframe from json objects but it is a complicated example.