I am trying to normalize a nested json response from this URL. As it is quite nested, i am not able to achieve the following format, can anyone help me in right direction?
I am using this approach to normalize:
from urllib.request import urlopen
import json
from pandas.io.json import json_normalize
import pandas as pd
class jsonResp():
def __init__(self):
global data
global data1
global path
pd.set_option('display.max_rows', 500)
pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 1000)
requestURL = ("http://data.corkcity.ie/api/3/action/datastore_search?id=6cc1028e-7388-4bc5-95b7-667a59aa76dc") #Request urls for json
responseOpen = urlopen(requestURL)
elevations = responseOpen.read() #Reads the response
data = json.loads(elevations) #Loads the json file for normalization and parsing
df = pd.DataFrame.from_dict(json_normalize(data), orient='columns')
print(df)
if __name__ == '__main__':
obj = jsonResp()
Thanks
