reprospect.utils.rich_helpers module
- class reprospect.utils.rich_helpers.TableMixinView on GitHub
Bases:
objectDefine
__str__()based on therich.table.Tablerepresentation fromto_table().- final __str__() strView on GitHub
Use
rich.console.Consolein capture mode.
- abstractmethod to_table() TableView on GitHub
Convert to a
rich.table.Table.
- class reprospect.utils.rich_helpers.TreeMixinView on GitHub
Bases:
objectDefine
__str__()based on therich.tree.Treerepresentation fromto_tree().- final __str__() strView on GitHub
Use
rich.console.Consolein capture mode.
- abstractmethod to_tree() TreeView on GitHub
Convert to a
rich.tree.Tree.
- reprospect.utils.rich_helpers.df_to_table(df: DataFrame, *, rich_table: Table | None = None, show_index: bool = False, **kwargs) TableView on GitHub
Convert a
pandas.DataFrameto arich.table.Table.
- reprospect.utils.rich_helpers.ds_to_table(ds: Series) TableView on GitHub
Convert a
pandas.Seriesto arich.table.Table.
- reprospect.utils.rich_helpers.to_string(ro: Table | Tree, *, width: int = 200, no_wrap: bool = True, **kwargs) strView on GitHub
Use
rich.console.Consolein capture mode to render arichobject to a string.