Browse Source

read durchmesser

beatescheibel 5 years ago
parent
commit
5380eb16cf
1 changed files with 21 additions and 0 deletions
  1. 21 0
      read_data.py

+ 21 - 0
read_data.py

@@ -0,0 +1,21 @@
+#if(+ oder - merge with next line)
+
+#merge all values into one until 4 values or until no integer/string with number
+
+
+#?0,05 equals +/- 0,5
+
+import csv
+
+with open('merged.csv') as csv_file:
+    csv_reader = csv.reader(csv_file, delimiter=',')
+    line_count = 0
+    durchmesser = False
+    for row in csv_reader:
+        if durchmesser:
+            print("Durchmesser: " + row[1])
+        durchmesser = False
+        if row[1] == "%%c":
+            durchmesser = True
+        line_count += 1
+    print(f'Processed {line_count} lines.')