Depending on how you read your json data, you might have to change the 'data' object. I took the file exactly as presented in pastebin. Essentially, I just used list comprehension to pull the individual columns and headers from the first json object.
There's probably a more elegant (read: more concise) way to write the list comprehension for multiple lists, but this shows exactly what is happening for each column.
with open('iris.json', 'rb') as f:
data = json.loads(f.read().decode('utf-8'))['iris_data']
headers = list(data[0].keys())
users = [d['UserName'] for d in data]
emails = [d['Email'] for d in data]
ips = [d['IP'] for d in data]
dola = [d['DataDolaczenia'] for d in data]
licz = [d['LiczbaUrzadzen'] for d in data]
czya = [d['CzyAdmin'] for d in data]
cells = [users, emails, ips, dola, licz, czya]
fig = go.Figure(data=[go.Table(
header=dict(values=headers,
fill_color='paleturquoise',
align='left'),
cells=dict(values=cells,
fill_color='lavender',
align='left'))
])
fig.show()
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…