Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

DOC: pandas.DataFrame.to_html additional description for the border parameter #60148

Closed
1 task done
ivor25 opened this issue Oct 30, 2024 · 1 comment · Fixed by #60830
Closed
1 task done

DOC: pandas.DataFrame.to_html additional description for the border parameter #60148

ivor25 opened this issue Oct 30, 2024 · 1 comment · Fixed by #60830
Assignees
Labels
Docs IO HTML read_html, to_html, Styler.apply, Styler.applymap

Comments

@ivor25
Copy link

ivor25 commented Oct 30, 2024

Pandas version checks

  • I have checked that the issue still exists on the latest versions of the docs on main here

Location of the documentation

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_html.html

Documentation problem

pandas.DataFrame.to_html parameter border is missing description for the behaviour when the border=0 or border=False is passed.

This means that documenation should be extended, as if the border=0 or False is passed, the border is not present in the output <table> tag. Documentation indicates that border will always be included but this is lie. This behaviour was introduced in the pandas 1.5.0: https://pandas.pydata.org/pandas-docs/version/1.5.0/whatsnew/v1.5.0.html#:~:text=to_html()%20now%20excludes%20the%20border%20attribute%20from%20%3Ctable%3E%20elements%20when%20border%20keyword%20is%20set%20to%20False.

Suggested fix for documentation

Improved description for the border parameter:

border: int or bool
When an integer value is provided, it sets the border attribute in the opening

tag, specifying the thickness of the border.
If False or 0 (zero) is passed, the border attribute will not be present in the <table>tag.

The default value for this parameter is governed by pd.options.display.html.border.

@ivor25 ivor25 added Docs Needs Triage Issue that has not been reviewed by a pandas team member labels Oct 30, 2024
@ivor25
Copy link
Author

ivor25 commented Oct 30, 2024

take

@rhshadrach rhshadrach added IO HTML read_html, to_html, Styler.apply, Styler.applymap and removed Needs Triage Issue that has not been reviewed by a pandas team member labels Oct 30, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Docs IO HTML read_html, to_html, Styler.apply, Styler.applymap
Projects
None yet
2 participants