From b50d549ce2d9aa50ce32de936c76ac7f65c9acee Mon Sep 17 00:00:00 2001 From: coolneng Date: Mon, 15 Mar 2021 21:46:58 +0100 Subject: [PATCH] Cast header values to integers --- src/preprocessing.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/preprocessing.py b/src/preprocessing.py index e1dc958..bbd4d0d 100644 --- a/src/preprocessing.py +++ b/src/preprocessing.py @@ -1,11 +1,10 @@ -from sys import argv from pandas import read_table def read_header(filename): with open(filename, "r") as f: header = f.readline().split() - return header[0], header[1] + return int(header[0]), int(header[1]) def parse_file(filename): @@ -14,11 +13,3 @@ def parse_file(filename): filename, names=["source", "destination", "distance"], sep=" ", skiprows=[0] ) return n, m, df - - -def main(): - parse_file(argv[1]) - - -if __name__ == "__main__": - main()