I'm looking into making a button that displays a dataframe in a new window in my Tkinter app. Did some googling but couldn't find anything. Any ideas? Much appreciated!!
class MyApp():
def __init__(self, master):
self.master = master
master.title("My App")
self.button1 = Button(master, text="Display df", command=self.display_df_in_new_window)
self.button1.place(x=60, y=100,height = 44, width = 127)
def get_data(self):
##code to get data
return df
def display_df_in_new_window(self):
## code
root = Tk()
my_gui = MyApp(root)
root.geometry("600x450")
root.mainloop()