I want the user to pick a file from file explorer and get its path into a variable, ex:
filepath = "C\User\Random_File\excel_archive.xlsx"
and use that variable to load it into a pandas dataframe
df = pd.read_excel(filepath)
only thing I have now is this:
def fileopen():
filepath = filedialog.askopenfile()
label = Label(text=filepath).pack()
df = pd.read_excel(label)
button_choose_file = Button(window, text='choose file', command = fileopen).pack()
but it doesn't work. How can I solve this?