-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
enhancement: add optional row/col paramater to to_latex formatter #13203
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
Comments
@TomAugspurger How do you envision the new @nbecker You know you already have to specify the column for |
I want to know the index so I can style certain elements according to some computation. For example, |
I think the parts that can be reused are public API parts like Other than that it'd be up to the subclass to implement
|
I've pushed a branch here sketching out what the start of the refactor might look like. At this point it's worth asking whether all this is still in scope for pandas? Other than LaTeX I'd say the big one is Markdown, which wouldn't be much code, so maybe it's OK to keep in pandas. |
Now that we have |
Though note that Styler explicitly sets a style per cell. We won't be producing idiomatic TeX that way, in the sense that we won't control the formatting (justification etc) of entire columns, nor arbitrary macros to reformat a class of cells. |
I need to have to_latex formatter function know the row/col of the item being formatted, so it can modify the formatting of certain items, e.g., set some items in color of bold based on the values in the table.
To do this in a backward compatible way, I propose adding a keyword to to_latex - which would then cause the formatter function to be called as
formatter (element value, row#, col#)
The text was updated successfully, but these errors were encountered: