BUG: Calling to_html with float_format strips all trailing zeros if an integer string is returned from the formatter #40024
Labels
IO HTML
read_html, to_html, Styler.apply, Styler.applymap
Output-Formatting
__repr__ of pandas objects, to_string
Regression
Functionality that used to work in a prior pandas version
Milestone
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Code Sample, a copy-pastable example
Output:
Problem description
This caused by the rstrip in pandas.io.formats.format._trim_zeros_single_float()
Expected Output
Output of
pd.show_versions()
The text was updated successfully, but these errors were encountered: