-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Right align numbers in HTML repr of tables #12144
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
Labels
Enhancement
IO HTML
read_html, to_html, Styler.apply, Styler.applymap
Output-Formatting
__repr__ of pandas objects, to_string
Styler
conditional formatting using DataFrame.style
Comments
We haven't hooked up df = pd.DataFrame(np.random.randn(4, 4))
df
df.style.set_table_styles(
[{"selector": "td", "props": [("text-align", "right")]}]
).set_precision(2) To right-align each cell, or inject that css straight into the notebook. |
13 tasks
add to #11610 the master tracker for this issue |
Awesome, thanks. |
Still works :-) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Enhancement
IO HTML
read_html, to_html, Styler.apply, Styler.applymap
Output-Formatting
__repr__ of pandas objects, to_string
Styler
conditional formatting using DataFrame.style
Is there a way to right-align numbers in the HTML repr of tables? Right now they are left aligned, and it is a bit of a pain.
I see there is a lot of work on conditional HTML formatting recently (e.g, #10250). Is it already possible to achieve this?
/cc @TomAugspurger
The text was updated successfully, but these errors were encountered: