Skip to content

Instantly share code, notes, and snippets.

@v-p-b
Last active November 15, 2023 13:48
Show Gist options
  • Save v-p-b/72cd29b49f739f1fd7c7d717af25a35a to your computer and use it in GitHub Desktop.
Save v-p-b/72cd29b49f739f1fd7c7d717af25a35a to your computer and use it in GitHub Desktop.
CSV to Textile with Python Tabulate
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