From 8d8184da5eef77927d89b4380d5764527a5ccb8d Mon Sep 17 00:00:00 2001 From: emkael Date: Wed, 7 Jun 2017 02:26:12 +0200 Subject: Helper script for converting Cezar ranking CSV to usable format --- bin/convert-cezar-ranking-csv.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 bin/convert-cezar-ranking-csv.py (limited to 'bin') diff --git a/bin/convert-cezar-ranking-csv.py b/bin/convert-cezar-ranking-csv.py new file mode 100644 index 0000000..4dcee92 --- /dev/null +++ b/bin/convert-cezar-ranking-csv.py @@ -0,0 +1,9 @@ +import csv, sys + +data = list(csv.reader(file(sys.argv[1]), delimiter=";")) + +output = csv.writer(file(sys.argv[2], 'w')) + +date = data[1][3] +for row in data[4:-1]: + output.writerow([row[0], date, row[2], row[1]]) -- cgit v1.2.3