So I have the following Code. It should export an excelfile but the naming does not work. Though the contents are alright. The file is named "Empty DataFrame Columns: [Column1, Column2] Index: [].xlsx"
It should be named testDF.xlsx. Is there an easy solution?
import pandas as pd
ExportExcelParam = 1;
testDF = pd.DataFrame(columns=['Column1','Column2'], dtype=object)
def ExcelExportDF(Dataframe, ExportExcelParam):
if ExportExcelParam == 1:
Filename = str(Dataframe) + ".xlsx"
Dataframe.to_excel(Filename)
ExcelExportDF(testDF, ExportExcelParam)