Skip to content
Advertisement

How can I save multiple dataframes onto one excel file (as separate sheets) without this error occurring?

I have the following Python code:

JavaScript

I’m reading the excel file which contains two sheets and then saving those sheets into a new excel file but unfortunately I’m receiving the following error:

JavaScript

Any ideas on how I can fix this?. Thanks.

Advertisement

Answer

Change [0] to 0 in pd.read_excel(path, sheet_name = [0]) will resolve this issue

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement