question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update DataFrame.to_latex() to have more flexibility

See original GitHub issue

The simple library matrix2latex has a lot of functionality packed into a single function. I think capturing some of those features in the current DataFrame.to_latex() method would make to_latex() much more useful.

The flexibility I am talking about is being able to do these types of things:

  • pass in arbitrary environment names
  • specify the justification of each column (as well as vertical rules between them)
  • natural handling for latex symbols like \infty
  • insert captions and labels into the tabular environment

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Reactions:4
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
gideonitecommented, May 20, 2019

I would like to be able to automatically make certain rows bold. For example, bold the largest values in each column.

Any thoughts on what the right abstraction is for this type of functionality? I’m inclined to think that the user can pass specific rows as well as a function specifying the formatting. (e.g. \bf{}). Then there can be specific options to automatically select on common criteria like max or min.

0reactions
WillAydcommented, Feb 18, 2020

@KaleabTessera if you have something specific you should like to see probably best opening a separate issue for it at this point

Read more comments on GitHub >

github_iconTop Results From Across the Web

Table Visualization — pandas 1.5.2 documentation - PyData |
Using .set_table_styles() to control broader areas of the table with specified internal CSS. Although table styles allow the flexibility to add CSS ...
Read more >
`pandas.to_latex` - how to make column names bold
I use the result of to_latex() and split it in three sections. ... is ultimatelty intended to replace the older and less flexible...
Read more >
Changelog • huxtable
This should improve centring when tables are too wide. You may need to update the LaTeX “adjustbox” package to a recent version. check_latex_dependencies()...
Read more >
The tableby function
Subsetting (change the ordering of the variables, delete a variable, ... If you want to take a quick look at the table, you...
Read more >
LaTeX/Tables - Wikibooks, open books for an open world
Once you are comfortable with basic LaTeX tables, you might have a look at more advanced packages or the export options of your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found