Skip to content
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

Feature request: LaTeX column names for DataFrames #6770

Open
HenningBeyer opened this issue Apr 21, 2024 · 1 comment
Open

Feature request: LaTeX column names for DataFrames #6770

HenningBeyer opened this issue Apr 21, 2024 · 1 comment

Comments

@HenningBeyer
Copy link

You can see in the follwing image, how in Jupyter Lab the column names of a DataFrame can be rendered as LaTeX strings, which improves readability for physics datasets a lot.

I was frequent user of these LaTeX strings before using Panel, and would really like to see this added in the future. Thanks!

Jupyter_outputs

Here is the Code:

import pandas as pd
import panel as pn
pn.extension()
pn.extension('mathjax', 'katex')
df = pd.DataFrame([[1,2,3,4]], columns=[r'$$\text{Mean } x$$', r'$$\frac{\partial x}{\partial t}$$', r'$$\frac{\partial x}{\partial y}$$', r'$$\frac{\partial x}{\partial z}$$'])
pn.pane.DataFrame(df)

@HenningBeyer
Copy link
Author

Here is another image from inside a panel application I recently made:

image

I still could not find a way around it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant