Last active
September 17, 2024 09:01
-
-
Save v-p-b/72cd29b49f739f1fd7c7d717af25a35a to your computer and use it in GitHub Desktop.
CSV to Textile with Python Tabulate
This file contains 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
import csv | |
import sys | |
import tabulate # https://pypi.org/project/tabulate/ | |
with open(sys.argv[1], newline='') as csvfile: | |
reader = csv.DictReader(csvfile) | |
print(tabulate.tabulate(reader, tablefmt="textile", headers="keys")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment