Created
July 9, 2013 09:10
-
-
Save mwacc/5955882 to your computer and use it in GitHub Desktop.
read/write file
This file contains 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
int i = 0; | |
File file = new File("out2.csv") | |
file << "Id,Action\n" | |
new File('out.csv').eachLine { line -> | |
if(i > 0) { | |
file.append i | |
file.append ',' | |
file.append Double.valueOf(line) > 0.6 ? 1 : 0; | |
file.append '\n' | |
} | |
i++ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment