From 8ad418eeb2979e729eb42bfe20e7602045b1e24e Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Thu, 2 May 2024 11:09:20 +0100 Subject: [PATCH] avoid range index as it breaks interactive tables --- cli/openbb_cli/controllers/cli_controller.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cli/openbb_cli/controllers/cli_controller.py b/cli/openbb_cli/controllers/cli_controller.py index 8c79ae6f842e..e82a5dbdfc0b 100644 --- a/cli/openbb_cli/controllers/cli_controller.py +++ b/cli/openbb_cli/controllers/cli_controller.py @@ -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():