Skip to content

ENH: latex styler bool pandas options #43670

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 8 commits into from
Oct 18, 2021

Conversation

attack68
Copy link
Contributor

@attack68 attack68 added Styler conditional formatting using DataFrame.style IO LaTeX to_latex API Design labels Sep 20, 2021
@jreback
Copy link
Contributor

jreback commented Sep 21, 2021

can we add only the most important options here, e.g. it is perfectly fine to have keyword args that are not set by a global option. the namespace is getting cluttered.

@attack68
Copy link
Contributor Author

sure, do you want to review some of the other ones that went in, and, to be consistent in terms of importance, remove some others also?

Always easier to add something back than to remove it after a release.

@jreback
Copy link
Contributor

jreback commented Sep 23, 2021

sure, do you want to review some of the other ones that went in, and, to be consistent in terms of importance, remove some others also?

Always easier to add something back than to remove it after a release.

yeah i think let's keep the options to the current exposed ones in prior versions e.g. don't add non-super-common options (i know vague)

@attack68
Copy link
Contributor Author

sure, do you want to review some of the other ones that went in, and, to be consistent in terms of importance, remove some others also?
Always easier to add something back than to remove it after a release.

yeah i think let's keep the options to the current exposed ones in prior versions e.g. don't add non-super-common options (i know vague)

I removed css_convert and siunitx since they are probably more rarely used, but hrules I think should stick becuase DataFrame.to_html and Styler.to_html, have different defaults, the DataFrame version can only use True and Styler can render both with a False default.

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

looks fine, doc comment, ping on green.

Set to `True` to add \\toprule, \\midrule and \\bottomrule from the
{booktabs} LaTeX package.
Defaults to ``pandas.options.styler.latex.hrules``, which is `False`.
Copy link
Contributor

Choose a reason for hiding this comment

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

can you add a versionchanged 1.4 here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

sparse_columns : bool, optional
Whether to sparsify the display of a hierarchical index. Setting to False
will display each explicit level element in a hierarchical key for each
column. Defaults to ``pandas.options.styler.sparse.columns`` value.
column. Defaults to ``pandas.options.styler.sparse.columns``, which
Copy link
Contributor

Choose a reason for hiding this comment

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

same

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this one hasn't changed, just clarified docs.

@jreback jreback added this to the 1.4 milestone Oct 3, 2021
@attack68
Copy link
Contributor Author

attack68 commented Oct 5, 2021

@jreback ping green

@jreback jreback merged commit 0bad85d into pandas-dev:master Oct 18, 2021
@jreback
Copy link
Contributor

jreback commented Oct 18, 2021

cool

@attack68 attack68 deleted the styler_latex_options branch October 19, 2021 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design IO LaTeX to_latex Styler conditional formatting using DataFrame.style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants