Skip to content

Commit

Permalink
avoid range index as it breaks interactive tables (#6360)
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoaquim authored May 2, 2024
1 parent a0d580a commit 4097033
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cli/openbb_cli/controllers/cli_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ def method_call_command(self, _, router: str):
"""Call command."""
mdl = getattr(obb, router)
df = pd.DataFrame.from_dict(mdl.model_dump(), orient="index")
if isinstance(df.columns, pd.RangeIndex):
df.columns = [str(i) for i in df.columns]
return print_rich_table(df, show_index=True)

for router, value in PLATFORM_ROUTERS.items():
Expand Down

0 comments on commit 4097033

Please sign in to comment.