Skip to content

Instantly share code, notes, and snippets.

@dominikb1888
Last active July 6, 2022 19:27
Show Gist options
  • Select an option

  • Save dominikb1888/35c4952f050fc0fd958fdaf8b311d2cc to your computer and use it in GitHub Desktop.

Select an option

Save dominikb1888/35c4952f050fc0fd958fdaf8b311d2cc to your computer and use it in GitHub Desktop.
from rich.table import Table
def rich_df(df):
table = Table()
for col in df.columns:
table.add_column(str(col))
for row in df.values.tolist():
table.add_row(*[str(item) for item in row])
return table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment