Skip to content

Commit

Permalink
Merge pull request #202 from AI-SDC/200-prettify_tablestringdata-mess…
Browse files Browse the repository at this point in the history
…es-column-parsing-if-first-variable-value-has-spaces

fixes bug in way SDC info is displayed via prettify_table
  • Loading branch information
mahaalbashir authored Mar 28, 2024
2 parents 444209b + 6f7b561 commit 2d09424
Show file tree
Hide file tree
Showing 3 changed files with 197 additions and 3,105 deletions.
1 change: 1 addition & 0 deletions acro/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ def prettify_table_string(table: pd.DataFrame, separator: str | None = None) ->
hdelim = "-"
vdelim = "|"

table.rename(columns=lambda x: str(x).replace(" ", "_"), inplace=True)
output = table.to_string(justify="left")
as_strings = output.split("\n")
nheaders = len(as_strings) - table.shape[0]
Expand Down
Loading

0 comments on commit 2d09424

Please sign in to comment.