API: consistent float_format specification #9448
Labels
API - Consistency
Internal Consistency of API/Behavior
Enhancement
IO CSV
read_csv, to_csv
Output-Formatting
__repr__ of pandas objects, to_string
For now just some observations:
float_format
:to_csv
(as well asto_excel
) states:string, Format string for floating point numbers
df.to_csv(float_format='%.3f')
to_string
(as well asto_html
) says:one-parameter function, Formatter function to apply to columns’ elements if they are floats
df.to_string(float_format='{:.3f}'.format)
display.float_format
also accepts a callable following the docsQuestion:
'{:.3f}'.format)
more convenient?There are a lot of different issues already about formatting, but I didn't find anything about this in specific.
The text was updated successfully, but these errors were encountered: