CLN: Consistency of arguments in to_html and to_string #23612
Labels
Clean
good first issue
IO HTML
read_html, to_html, Styler.apply, Styler.applymap
Needs Discussion
Requires discussion from core team before further action
Milestone
The methods
to_html
andto_string
share most of the parameters, together withDataFrameFormatter
, but there are some differences in the order, and in some parameters that probably should be the same.Those are the common parameters:
But after
formatters
they are in different order, which adds complexity (for example in reusing docstrings, or in switching from one function to another when using positional arguments).Then, those are the parameters that are not shared among the 3:
While that looks mostly ok, it feels like probably
to_string
should also have adecimal
argument (and not sure whatDataFrameFormatter
should have.What I propose is:
decimal
toto_string
, and check if any other addition (or deletion) makes sense.pandas/io/formats/format.py
there is a relateddocstring_to_string
variable that is not being used, so we should remove it.@jreback happy to make these changes?
CC @thoo
The text was updated successfully, but these errors were encountered: