Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

default_cell_formatter() in DataTable formats float to 2-digit scale, which is often undesirable. #4933

Closed
grvstick opened this issue Aug 26, 2024 · 1 comment

Comments

@grvstick
Copy link

Code

content = f"{obj:.2f}"

This defaults all floats to be in 2-digit scale. I think it would be better to change this to simple float-to-str conversion, so that the user can decide the scale. If there is a specific reason to limit the float type scales, the scale should be left to maximum to the limits.

@grvstick grvstick changed the title default_cell_formatter() in DataTable formats float in 2-digit scale, which is often undesirable. default_cell_formatter() in DataTable formats float to 2-digit scale, which is often undesirable. Aug 26, 2024
@Textualize Textualize deleted a comment Aug 26, 2024
@darrenburns
Copy link
Member

@grvstick It likely was a virus.

The original plan was to expose this function to end users, but that never came to fruition. Hopefully DataTable can get a bit of love soon to give more control over things like this 😄

@Textualize Textualize deleted a comment from github-actions bot Aug 26, 2024
@github-staff github-staff deleted a comment from grvstick Aug 27, 2024
@Textualize Textualize locked and limited conversation to collaborators Sep 12, 2024
@darrenburns darrenburns converted this issue into discussion #4993 Sep 12, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@darrenburns @grvstick and others