https://stackoverflow.com/questions/2535255/fastest-way-convert-tab-delimited-file-to-csv-in-linux
grep -n ^$ /path/to/file
^$ start end => mean blank line
import sys import csv tabin = csv.reader(sys.stdin, dialect=csv.excel_tab) commaout = csv.writer(sys.stdout, dialect=csv.excel) for row in tabin: commaout.writerow(row) Run it from a shell as follows: python script.py < input.tsv > output.csv
Comments
Post a Comment