Skip to content

Commit

Permalink
add csv.py
Browse files Browse the repository at this point in the history
  • Loading branch information
KenichiNomura committed Apr 3, 2020
1 parent bb1ab0d commit 834b513
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions util/script/csv.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import sys

filename = sys.argv[1]

data = []
with open(filename,'r') as f:
for line in f:
print(line)
data.append(line.split())

with open(filename+'.csv','w') as f:
for d in data:
line = ''
for d0 in d:
line = line + (d0+',')
f.write(line+'\n')

0 comments on commit 834b513

Please sign in to comment.