I have function in Python Pandas like below (it is sample):
def xyz():
df = pd.DataFrame({"a" : [1,1,1]})
TodaysDate = time.strftime("%Y-%m-%d")
excelfilename = "raport_" +TodaysDate +".xlsx"
df.to_excel(excelfilename, sheet_name="raport", index=True)
return df
Every time I run above function the existing excel file gets overwritten but I need a new excel file to be created every time I run the function. How can I modify my function to do that in Python ?