Skip to content

Commit

Permalink
markdown table
Browse files Browse the repository at this point in the history
jdebacker committed Aug 8, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 402a0c3 commit 79dcd46
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ogcore/utils.py
Original file line number Diff line number Diff line change
@@ -433,8 +433,10 @@ def save_return_table(table_df, output_type, path, precision=2):
table_df.to_csv(path_or_buf=path, index=False, na_rep="")
elif output_type == "json":
table_df.to_json(path_or_buf=path, double_precision=precision)
# elif output_type == "md": # TODO: figure out how to save md to disk
# table_df.to_markdown(path_or_buf=path, double_precision=precision)
elif output_type == "md":
table_df.to_markdown(
buf=path, index=False, floatfmt=".{}f".format(precision)
)
elif output_type == "excel":
table_df.to_excel(excel_writer=path, index=False, na_rep="")
else:

0 comments on commit 79dcd46

Please sign in to comment.