For a program that takes information from the network I would like to display it in a table to make selections (calculate average, stdev ect.). I created a list of lists and I am trying to populate it into a treeview table. The populating works, but I get 3 duplicates of every row and the final result as found in the nested list shows 7 duplicates (while my list of lists only shows 1 result per line).
I've been struggling for some time to remove the duplicates and checked the suggestions here.
fullResults = [['a', '1', '2'], ['b', '3', '4'], ['c', '5', '6']]
def displayInfo():
for results in fullResults:
for result in results:
for value in result:
tree.insert('', 'end', values=result)
Can you please point me to some direction as the suggested tree.delete(*tree.get_children()) didn't work for me?
EDIT: after removing the last for loop, I managed to get the issue resolved and data is formatted nicely into the table.