I got the data which has nested dict inside.
I am trying to use json_normalize
to convert into dataframe, but I got an error.
d = ['{"appMetadata": {"index": "cfs_ccs_eddi_35725", "host": "iaasn00009634", "job": "splunk_scraper"}, "timestampEpochSecond": 1545172308711, "metricTags": {"source": "/local/apps/eddi/presentment/logs/eddi-http-presentment-requests.log"}, "metricName": "splunk.logs.tstats.count.per.min", "metricValue": 5, "metricType": "count"}']
df = pd.DataFrame.from_dict({(i,j): d[i][j]
for i in d.keys()
for j in d[i].keys()},
orient='index')
The error is:
AttributeError: 'list' object has no attribute 'keys'