Read files

This commit is contained in:
Maciej Sobkowiak 2021-05-25 21:34:03 +02:00
parent 756ef4277a
commit 2e150d9a9a

18
main.py Normal file
View File

@ -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)