etho.utils.tui#
- etho.utils.tui.df_to_table(pandas_dataframe: pandas.core.frame.DataFrame, show_index: bool = True, index_name: Optional[str] = None) rich.table.Table [source]#
Convert a pandas.DataFrame obj into a rich.Table obj. :param pandas_dataframe: A Pandas DataFrame to be converted to a rich Table. :type pandas_dataframe: DataFrame :param show_index: Add a column with a row count to the table. Defaults to True. :type show_index: bool :param index_name: The column name to give to the index column. Defaults to None, showing no value. :type index_name: str, optional
- Returns
The rich Table instance passed, populated with the DataFrame values.
- Return type
Table