I'm trying to create a prettytable with 4 columns. The information I'm trying to insert per row are located in different python dictionary. I would assume the code below will work but i'm receiving the error below
Exception: Row has incorrect number of values, (actual) 2!=4 (expected)
My code is:
t = PrettyTable(['key', 'Start', 'End', 'Retention'])
for key, val in total.items():
t.add_row([key, val])
for key, val in dic.items():
t.add_row([key, val])
print(t)