Skip to content

Instantly share code, notes, and snippets.

@sqlstunts
Last active August 29, 2015 14:26
Show Gist options
  • Save sqlstunts/3b8de3ce4147fd312d5d to your computer and use it in GitHub Desktop.
Save sqlstunts/3b8de3ce4147fd312d5d to your computer and use it in GitHub Desktop.
import csv
from tabulate import tabulate
if __name__ == '__main__':
report_headers = []
data = []
with open('data.csv','r') as f:
reader=csv.reader(f,delimiter='\t')
for dataRow in reader:
data.append(dataRow)
report_headers = data[0]
del data[0]
print tabulate(data,report_headers)
@sqlstunts
Copy link
Author

To use this python script you'll have to install the tabulate package:
https://pypi.python.org/pypi/tabulate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment