Created
December 12, 2018 00:24
-
-
Save gchavez2/3c007e4547ac88c23e5504fd779107ae to your computer and use it in GitHub Desktop.
Open csv file and just save a few columns
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
# module load python/3.6-anaconda-4.4 | |
import csv | |
with open("susy_full_normed_train.csv","rt", encoding="utf8") as source: | |
rdr= csv.reader( source ) | |
with open("susy_full_normed_train_low_features.csv","wt") as result: | |
wtr= csv.writer( result ) | |
for r in rdr: | |
wtr.writerow( (r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7] ) ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment