Creating Sheets in Excel with Pandas /u/Axiom_ML Python Education

Hi,

I have an excel workbook called “investors_data.xlsx” with one sheet of data in it that i’ll call “Raw Data”.

Can I use Pandas to create additional blank sheets in the workbook?

I can get close using ExcelWriter:

with pd.ExcelWriter(“investors_data.xlsx”, mode=”a”, engine=”openpyxl”) as writer:

investor_df.to_excel(writer, sheet_name = “Some Sheet”)

This code saves a new sheet to my excel workbook “Investors_data”, but the sheet has the same data as my original “Raw Data” sheet, whereas I would like a blank sheet.

I imagine there’s a simple way to create a blank sheet in an excel workbook, but i’m trying to learn this on my own and frankly have no idea what i’m doing 🙂

submitted by /u/Axiom_ML
[link] [comments]

​r/learnpython Hi, I have an excel workbook called “investors_data.xlsx” with one sheet of data in it that i’ll call “Raw Data”. Can I use Pandas to create additional blank sheets in the workbook? I can get close using ExcelWriter: with pd.ExcelWriter(“investors_data.xlsx”, mode=”a”, engine=”openpyxl”) as writer: investor_df.to_excel(writer, sheet_name = “Some Sheet”) This code saves a new sheet to my excel workbook “Investors_data”, but the sheet has the same data as my original “Raw Data” sheet, whereas I would like a blank sheet. I imagine there’s a simple way to create a blank sheet in an excel workbook, but i’m trying to learn this on my own and frankly have no idea what i’m doing 🙂 submitted by /u/Axiom_ML [link] [comments] 

Hi,

I have an excel workbook called “investors_data.xlsx” with one sheet of data in it that i’ll call “Raw Data”.

Can I use Pandas to create additional blank sheets in the workbook?

I can get close using ExcelWriter:

with pd.ExcelWriter(“investors_data.xlsx”, mode=”a”, engine=”openpyxl”) as writer:

investor_df.to_excel(writer, sheet_name = “Some Sheet”)

This code saves a new sheet to my excel workbook “Investors_data”, but the sheet has the same data as my original “Raw Data” sheet, whereas I would like a blank sheet.

I imagine there’s a simple way to create a blank sheet in an excel workbook, but i’m trying to learn this on my own and frankly have no idea what i’m doing 🙂

submitted by /u/Axiom_ML
[link] [comments] 

Leave a Reply

Your email address will not be published. Required fields are marked *