I have a python tkinter GUI which will allow me to open a csv or Excel file and work on them and save the result in csv or Excel file .I want to save them in the desired location so I used asksaveasfile filedailog to get save prompt and it's working fine my problem is I want to save the csv or Excel file with the name , extension, location specified in the save prompt .How can I write my csv file to the field object created? Here is the code
def Save(self):
Self.filename = filedailog.asksavesafile(defaultextension = ".csv")
Self.filename.write(self.df.to_csv())
I want to save the data frame (df) with the specified name and to the specified location and extension