-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG : pandas.DataFrame.to_excel function not working in pandas 1.3.1 #43068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The documentation you quoted does not have an option to append to an existing sheet; is there a part of the documentation that indicates to you that you should be able to? Related: #42221 |
Yes there is
I am able to append to existing sheet on older pandas like 1.2.3 |
I see - there is a difference between an excel file and an excel sheet. With the option, you can append to the existing file, meaning to add or entirely replace a sheet in it, but there is currently no option to append to an already existing sheet. Perhaps the wording could be made more clear?
Can you post a reproducible example? |
@KuhakuPixel The documentation of |
Thanks for supplying an example @KuhakuPixel - as I had suspected it is very similar in nature to #42221. As such, I would request that any further discussion on whether or not pandas should support appending to an excel sheet be in #42221. Pending the outcome of that discussion, if it is not to be supported, then it seems to me we could perhaps make the documentation here a bit more clear. In particular, adding the a sentence to the effect of "pandas allows users to append to Excel files, but does not support the option to append to an already existing Excel sheet". |
@rhshadrach I think we can close, since this is implemented now? |
Yes, thanks @phofl |
[✅ ] I have checked that this issue has not already been reported.
[ ✅] I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
It seems this function is broken in pandas 1.3.0, when trying to append to an existing sheet it will either raise an error, create a new one or replace it so it is impossible to append a data frame to an existing sheet. according to this document
Expected Output
Able to append to an existing sheet without error
Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here leaving a blank line after the details tag]The text was updated successfully, but these errors were encountered: