An API is sending me data in the form of:
{
uselessInfo: blabla,
headers: [
{type:DIMENSION, name:DATE},
{type:DIMENSION, name:COUNTRY},
{type:METRIC, name:REVENUE}
],
rows: [
["2014-09-29","Germany",435],
["2014-09-28","USA",657],
...
["2014-09-13","Spain",321]
],
average: [ some unwanted info ],
total: [ some unwanted info ]
}
I want to create a dataframe in pandas from this object, using only:
- the headers info to name my columns
- the rows for the data
- And ignore the rest.
So far, I have tried to change parameters in pandas' ".read_json" but without any good results. I could not find any similar examples.