From 2e150d9a9a842a72a5a9b7856ee6128e6d6340dc Mon Sep 17 00:00:00 2001 From: Maciej Sobkowiak Date: Tue, 25 May 2021 21:34:03 +0200 Subject: [PATCH] Read files --- main.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..8253a72 --- /dev/null +++ b/main.py @@ -0,0 +1,18 @@ +import pandas as pd +import numpy as np +import gzip + + +x_labels = (pd.read_csv('in-header.tsv', sep='\t')).columns +y_labels = (pd.read_csv('out-header.tsv', sep='\t')).columns + +x_train = pd.read_table('train/in.tsv', error_bad_lines=False, + header=None, quoting=3, names=x_labels) +y_train = pd.read_table('train/expected.tsv', error_bad_lines=False, + header=None, quoting=3, names=y_labels) +x_dev = pd.read_table('dev-0/in.tsv', error_bad_lines=False, + header=None, quoting=3, names=x_labels) +x_test = pd.read_table('test-A/in.tsv', error_bad_lines=False, + header=None, quoting=3, names=x_labels) + +print(x_train)