I have a table full of data and I'm trying to get the 0th column of it into a Treeview. This is the code I'm using
# Query the database c.execute("SELECT * FROM addresses") records = c.fetchall() result_list = [records[0] for record in records] # Add Data my_tree.insert(parent='', index='end', iid='PLACEHOLDER', text="", values=(result_list, 1, 2, 3, 1000)) When I do this it returns my entire 0th row of data, instead of my 0th column.
https://stackoverflow.com/questions/65963656/how-do-i-use-list-indices-to-return-columns-of-data-instead-of-rows January 30, 2021 at 09:04AM
没有评论:
发表评论