Skip to content

DOC:add append example in to_excel documentation #27852

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

Merged
merged 3 commits into from
Aug 13, 2019
Merged

DOC:add append example in to_excel documentation #27852

merged 3 commits into from
Aug 13, 2019

Conversation

sameshl
Copy link
Contributor

@sameshl sameshl commented Aug 10, 2019

closes #27051


>>> with pd.ExcelWriter('the_existing_file.xlsx', engine='openpyxl',
... mode='a') as writer:
... df.to_excel(writer)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example feels disconnected with the rest of the docstring.

I'd move it to line 2181, and say something like ExcelWriter can also be used to append to an existing Excel file. And then use the same file output.xlsx and append a sheet Sheet_name_3. I think that will be much clearer.

You also need the # doctest: +SKIP as in the other examples.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. You are right. That will be clearer. Will make the required change

Copy link
Member

@datapythonista datapythonista left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks for taking care of this @sameshl

@TomAugspurger
Copy link
Contributor

Merged master to hopefully fix CI. Ping on green.

@sameshl
Copy link
Contributor Author

sameshl commented Aug 13, 2019

@TomAugspurger Looks good now!
Btw, could you explain why the build was failing and merging master to my branch fixed it? 😅
Thanks!

@datapythonista datapythonista merged commit f872bcd into pandas-dev:master Aug 13, 2019
@datapythonista
Copy link
Member

Thanks @sameshl

If there is something broken in master (e.g. a pandas dependency has been updated and it causes a test to fail), then all PRs will fail even if they are correct. So, master needs to be fixed first, and then the fixes in master need to be merged into the PRs that failed.

@sameshl sameshl deleted the doc_to_excel branch August 13, 2019 11:36
@sameshl
Copy link
Contributor Author

sameshl commented Aug 13, 2019

@datapythonista Thanks for the explanation!

quintusdias pushed a commit to quintusdias/pandas_dev that referenced this pull request Aug 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve to_excel Append Documentation
3 participants