From 2d3364b66e33d4daa33dd289c329f2911b82b6f7 Mon Sep 17 00:00:00 2001 From: Lukas Arnecke <1811572@stud.hs-mannheim.de> Date: Tue, 8 Jan 2019 16:12:48 +0100 Subject: [PATCH] =?UTF-8?q?Datei=20zum=20umschreiben=20der=20csv=20Datei?= =?UTF-8?q?=20in=20eine=20f=C3=BCr=20Matlab=20lesbare=20Struktur.=20Komma?= =?UTF-8?q?=20als=20Trennzeichen=20und=20kein=20Zeitstempel?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/csvfilter.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/csvfilter.py diff --git a/src/csvfilter.py b/src/csvfilter.py new file mode 100644 index 0000000..45e389f --- /dev/null +++ b/src/csvfilter.py @@ -0,0 +1,15 @@ +#!/usr/bin/python2 + +import csv +outFileName = 'visualisierung.csv' +file = open("wlan_pioneer_filtered.csv", "r") +csv_reader = csv.reader(file, delimiter="\n") +outFile = open(outFileName, "w") +for row in csv_reader: + array=row[0].split(';') + outFile.write("%s,%s,%s,%s\n" + % (array[1], array[2], array[3], array[4])) +file.close() +outFile.close() + +#Ergebnisdatei hat immer noch eine Überschrift. Manuell entfernen \ No newline at end of file