diff options
author | hjoaquim <h.joaquim@campus.fct.unl.pt> | 2024-05-02 11:09:20 +0100 |
---|---|---|
committer | hjoaquim <h.joaquim@campus.fct.unl.pt> | 2024-05-02 11:09:20 +0100 |
commit | 8ad418eeb2979e729eb42bfe20e7602045b1e24e (patch) | |
tree | 400a3ca4efea0fa6125ab6e4ae54cdf834fa8c91 | |
parent | a0d580ab25f91657b05acdadc47cd0999de102c7 (diff) |
avoid range index as it breaks interactive tablesbugfix/patch-model-display
-rw-r--r-- | cli/openbb_cli/controllers/cli_controller.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cli/openbb_cli/controllers/cli_controller.py b/cli/openbb_cli/controllers/cli_controller.py index 8c79ae6f842..e82a5dbdfc0 100644 --- a/cli/openbb_cli/controllers/cli_controller.py +++ b/cli/openbb_cli/controllers/cli_controller.py @@ -128,6 +128,8 @@ class CLIController(BaseController): """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(): |