Skip to content

Instantly share code, notes, and snippets.

@neelabalan
neelabalan / df_to_table.py
Created October 3, 2021 16:57 — forked from avi-perl/df_to_table.py
Convert a pandas.DataFrame object into a rich.Table object for stylized printing in Python.
from datetime import datetime
from typing import Optional
import pandas as pd
from rich import box
from rich.console import Console
from rich.table import Table
console = Console()