I have a menu button in a GUI I am making that displays a popup containing a CSV file, using pd.read_csv through pandas. However, there is a lot of data, and when the popup is displayed, pandas cuts off a lot of the data, only displaying the data in the beginning and in the end of the file.
I want to be able to scroll through all the data in my popup window. Any suggestions?
Here is the code for the popup command:
def popuptable():
popup = tk.Tk()
popup.wm_title("!")
label = ttk.Label(popup, text=(pd.read_csv('NameofCSVFile.csv')), font=NORM_FONT)
label.pack(side="top", fill="x", pady=10)
popup.mainloop()

Tkintershould use only oneTk()- to create second window useToplevel(). And it needs only onemainloop(). If you use secondmainloop()it can behave strange.Canvas()with this element and scroll canvas. Or use ScrolledText() which can be scrolled.Canvasis normal widget (likeLabelorButton) so you can use it inTk/Toplevelbut creating scrolledCanvassometimes makes problem - you can find example on SO.