I need a to create a button which displays a specific section of a filtered DataFrame
First, the DataFrame is built with the following lines of code:
def filter():
Data= df.loc[df["A"] == "Native"]
Data_2 = Data.loc[Data["B"] == Market]
Data_3 = Data_2.loc[Data_2["C"] == Class]
Data_4 = Data_3.loc[Data_3["D"] == Date]
print(Data_4 )
Then the GUI is the following
from tkinter import *
root = Tk()
root.geometry("600x600")
root.title("GUI NTV-TRN")
register_button = Button(root,text= "Enter", command = filter())
register_button.pack()
root.mainloop()
The problem is that when i launch the GUI, the printed output remains into my IDE and it is not displayed into the GUI itself. How can i fix this?
Thanks