1
0
forked from tdwojak/Python2018

small fix for task05.py

This commit is contained in:
s441401 2018-06-02 21:58:32 +02:00
parent 7ee310eb8f
commit 914bffad60

View File

@ -11,10 +11,10 @@ import glob
path = r'/home/ghermann/code/python_td/labs04/scores' #change for your system
files = glob.glob(path + '/*.npz.bleu')
dfs = [pd.read_csv(fp, sep = " ", header = None).assign(filepath = fp) for fp in files]
df = pd.concat(dfs, ignore_index = True)
dfs = [pd.read_csv(fp, sep=" ", header=None).assign(filepath=fp) for fp in files]
df = pd.concat(dfs, ignore_index=True)
df[2] = df[2].map(lambda c: c.rstrip(','))
df[2] = pd.to_numeric(df[2], errors = 'coerce')
df[2] = pd.to_numeric(df[2], errors='coerce')
print(df.at[df[2].idxmax(), 'filepath'])