-
Notifications
You must be signed in to change notification settings - Fork 164
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
Idea/Feature Request: Allow callable for floatfmt
.
#297
Comments
floatfmt
.floatfmt
.
I am facing a similar issue while printing data using tabulate- File "c:<FILEPATH>\VSCode\QuizApp\controllers\handlers\quiz_handler.py", line 59, in display_questions_by_category Type of data I am printing - <class 'str'> <class 'str'> <class 'str'> <class 'str'> |
I was able to work around this issue fine by setting |
I have a custom formatter for floats. One example feature is that I can format floats to be in exponential notation but to always have an exponent that is a multiple of 3 (engineering notation). Right now if I apply this formatter to a table (e.g. list of lists) and then run it through
tabulate
, all of the floats (now strings) will be re-cast as floats and reformatted using the default float format. This is not what I want. In fact, because "float castable stings" get converted back to floats it's actually impossible for me to get what I want. What would be better is if I can pass in a callable function to be used to format floats instead of just a python built-in format specification mini-language specifierThe text was updated successfully, but these errors were encountered: