Last active
December 28, 2015 03:39
-
-
Save samuell/7436526 to your computer and use it in GitHub Desktop.
Example showing how to manipulate tab separated data on the standard input, and write the manipulated data to standard output.
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
| import csv | |
| from sys import stdin, stdout | |
| tsv_in = csv.reader(stdin, delimiter="\t") | |
| tsv_out = csv.writer(stdout, delimiter="\t") | |
| for row in tsv_in: | |
| # Write out only columns 2-* | |
| tsv_out.writerow(row[1:]) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To be executed like this: