pandas icon indicating copy to clipboard operation
pandas copied to clipboard

DOC: Mention styler in the to_excel documentation

Open datapythonista opened this issue 3 years ago • 0 comments

xref #47525

In our DataFrame.to_excel documentation we don't have any mention to Styler.to_excel which is very relevant.

Users checking the documentation on how to export a DataFrame to Excel should be aware that they can use the Styler to format the exported file. Personally I'd add the class to See Also, and I'd add a very short example at the end of our examples, with a link to the Styler.to_excel page. I think that would be good for users who may be interested in that feature. But other ideas also welcome.

datapythonista avatar Aug 10 '22 05:08 datapythonista

I'm +1 on See Also and even an explicit note on when the Styler should be used (no surprise: adding styles to Excel output), but I don't think we should have examples of method A in the API docs of method B, even if they are closely related.

rhshadrach avatar Aug 10 '22 21:08 rhshadrach

Hi is there anyway in which I can help with docs creation. I am new to open source and want to get started with a good beginner issue.

Nikhil-Mudgal avatar Aug 12 '22 17:08 Nikhil-Mudgal

This is a quite simple issue to work on if you're new to contributing. Not much work to do here, so you can focus on learning. You should check the contributing section in the docs to know where to start.

datapythonista avatar Aug 12 '22 17:08 datapythonista

Ok thanks @datapythonista.

Nikhil-Mudgal avatar Aug 12 '22 17:08 Nikhil-Mudgal

Hello there! I was trying to set everything up to try to give my first contribution as well but come here too late :) Can I still ask if I was in the right direction with the current issue? Just for practice.

In case Nikhil-Mudgal doesn't want to read

Is it all about modifying a single line of the to_excel() docstring in the generic.py file?

image This is what I see when I build the doc function with Sphinx. However, hyperlinks are not working there. Is it normal or I am not considering something else?

ps: yep, forgot a space

FrnRmn avatar Aug 13 '22 18:08 FrnRmn

@FrnRmn - you're definitely on the right track here! The links should work, and for this issue we want to mention Styler.to_excel and not just Styler.

rhshadrach avatar Aug 13 '22 18:08 rhshadrach

Thank you for the feedback. When you say "the links should work" do you mean all the links that were already there? For example in the DataFrame.to_latex See Also section the Styler.to_latex element has not an internal reference link. Is it normal or there is a problem also in this other doc?

FrnRmn avatar Aug 14 '22 18:08 FrnRmn

Thanks for the heads up @FrnRmn. It's not expected that the Styler.to_latex link in https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_latex.html is broken. Do you mind creating an issue for it please? Links should work in the changes you did, and feel free to open a PR when you've got them ready.

datapythonista avatar Aug 15 '22 09:08 datapythonista

#48089 I hope this is done correctly

FrnRmn avatar Aug 15 '22 17:08 FrnRmn

@FrnRmn Hey fixed #48089, I can do this issue too if you would like?

samrao1997 avatar Aug 16 '22 02:08 samrao1997

@samrao1997 Hi, I have just seen your solution. I'll try your way and if I can't make it I'll tell you. Thanks

FrnRmn avatar Aug 16 '22 06:08 FrnRmn