Skip to content Skip to sidebar Skip to footer

Typeerror: To_excel() Missing 1 Required Positional Argument - Despite Using Excel Writer

I've been having trouble saving to excel using pandas with the following error: File 'C:/Users/Colleen/Documents/Non-online code/kit_names.py', line 36, in save_sheet_names pd.Data

Solution 1:

Simply change the to_excel() function to be caled on df

df =pd.DataFrame(arr)
y=os.path.basename(os.path.normpath(path))
new_path = r"C:\Users\Colleen\Documents\\"+y
writer = pd.ExcelWriter(new_path, engine='xlsxwriter')
df.to_excel(writer)

Post a Comment for "Typeerror: To_excel() Missing 1 Required Positional Argument - Despite Using Excel Writer"