-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
DEPR: LatexFormatter
in DataFrame.to_latex
in favour of Styler
#41649
Comments
What about backward compatibility? |
Don't deprecations by definition warn of failing backwards compatibility in a future version? For 1.x is it enough to just warn that I'm trying hard to try and avoid the case where the existing keyword signature of |
we can straight depreciate DataFrame.to_latex w/o changing the implementation at all sure if u can totally do everything in styler.to_latex that would be great but it's likely not a big deal to implement things later / drop features if needed |
DataFrame.to_latex()
in favour of Styler.to_latex()
DataFrame.to_latex
in favour of Styler.to_latex
@attack68 - similar to to_html, I would be in favor of keeping DataFrame.to_latex as a wrapper around Styler.to_latex. It sounds like the current arguments on DataFrame.to_latex make this difficult / undesirable; is it preferable to deprecate DataFrame.to_latex args in favor of the Styler signature rather than removing DataFrame.to_latex altogether? |
@rhshadrach as far as I can tell this is the current status:
I can see one of 3 possible evolutions for
|
Like most syntactic sugar, it's convenient. I would also hazard not many users are familiar with the Styler. Having a DataFrame method gives it visibility, where we can point to the Styler in the API docs for users that want more features. I'm +1 on 3. |
DataFrame.to_latex
in favour of Styler.to_latex
LatexFormatter
in DataFrame.to_latex
in favour of Styler
closing as completed via #47970 |
The tracker of items needed to do before deprecating
DataFrame.to_latex()
.jinja2
requirement for LaTeX output, sinceStyler
requiresjinja2
: this is blocker.Styler
compatible with non-unique indexes #41269).longtable
keyword or other environments (ENH: addenvironment
, e.g. "longtable", toStyler.to_latex
#41866).caption
to allow short and long captions, and allow top/bottom caption placement. (ENH: add long and short captions toStyler.to_latex
#41659)Styler.apply(map)_index
made compatible withStyler.to_latex
#41993)escape
inStyler.format
to str to allow "html" and "latex" #41619)enhancenot necessary.hide_columns
with.show_columns
alternative (optional).hide_columns
and.hide_index
to have dual function to hide the entire array, or specific items (API: makehide_columns
andhide_index
have a consistent signature and function inStyler
#41266)styler
option context for sparsification of columns and index separately #41512)validation fornot necessarycolumn_format
to pass tests or just rely on docs/duck typing?caption
to pass tests (CLN: add arg validation forcaption
#43368) or just remove the validation in favour of duck typing?Styler.format_index()
to display index values similarly to data-values withformat()
#43101siunitx
for encapsulating headers in curly braces only when necessary REF:styler.to_latex
siunitx changes: render {} only when needed. #43397names
toStyler.hide_index
#43346multirow
naive implementationStyler.to_latex
part1 #43369 ENH:multicol
naive implementation. part2 #43382label
render inStyler.to_latex
ifcaption
and"longtable"
#43399Removed Keyword Args
col_space
: removed sinceStyler.to_latex()
does not necessarily produce display values of equal length, (this is a console display only arg)sparsify
: replaced by alternative kwargssparse_index
andsparse_columns
multicolumn
,multicolumn_format
,multirow
: replaced by alternative kwargsmultirow_align
multicol_align
formatters
float_format
: replaced by the superiordf.style.format(...)
argsThe text was updated successfully, but these errors were encountered: