T341589: Improve formatting of df_to_remarkup / add kwargs
Changes
-
df_to_remarkup
now makes use ofpandas.DataFrame.to_markdown
to dramatically simplify the code- Adding
.replace(":", "-")
to the result is the only required change for Phabricator formatting
- Adding
- This change also allows for kwargs for
pandas.DataFrame.to_markdown
and the Python packagetabulate
to be passed for formatting the results (including row numbers and formatting float columns) - The doc string for the function has been changed to reflect the new usage and includes examples for the
index
andfloatfmt
kwargs - Minor changes to indentation in
utils.py
in places where two spaces were being used instead of four
Notes
- Please see T341589 for the discussion :)