From c5bccf2f29b37dd6b07ff3568178967260a226e9 Mon Sep 17 00:00:00 2001 From: coolneng Date: Mon, 3 May 2021 18:00:18 +0200 Subject: [PATCH] Adapt preprocessing module to the new lab --- src/preprocessing.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/preprocessing.py b/src/preprocessing.py index bbd4d0d..56a3543 100644 --- a/src/preprocessing.py +++ b/src/preprocessing.py @@ -4,11 +4,12 @@ from pandas import read_table def read_header(filename): with open(filename, "r") as f: header = f.readline().split() - return int(header[0]), int(header[1]) + return int(header[0]) def parse_file(filename): - n, m = read_header(filename) + n = read_header(filename) + m = 50 df = read_table( filename, names=["source", "destination", "distance"], sep=" ", skiprows=[0] )