Last active
July 6, 2022 19:27
-
-
Save dominikb1888/35c4952f050fc0fd958fdaf8b311d2cc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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