Created
October 8, 2021 12:38
-
-
Save kidpixo/52c0286d95a510d28f0eac6da04d5fe8 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
#!/usr/bin/env python | |
"""Show table content with rich. Quick'n'dirty: no validity checks, only the fun :-D. | |
""" | |
import sys | |
from pandas import read_csv | |
from rich import print | |
from pathlib import Path | |
import os | |
size = os.get_terminal_size() | |
for p in sys.argv[1:]: | |
print(f"Loading file [bold green]{Path(p).name}[/bold green]", ":smiley:") | |
print(read_csv(p)) | |
print('[red]'+'='*size.columns+'[/red]') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment