forked from tdwojak/Python2018
small fix for task05.py
This commit is contained in:
parent
7ee310eb8f
commit
914bffad60
@ -11,10 +11,10 @@ import glob
|
|||||||
path = r'/home/ghermann/code/python_td/labs04/scores' #change for your system
|
path = r'/home/ghermann/code/python_td/labs04/scores' #change for your system
|
||||||
files = glob.glob(path + '/*.npz.bleu')
|
files = glob.glob(path + '/*.npz.bleu')
|
||||||
|
|
||||||
dfs = [pd.read_csv(fp, sep = " ", header = None).assign(filepath = fp) for fp in files]
|
dfs = [pd.read_csv(fp, sep=" ", header=None).assign(filepath=fp) for fp in files]
|
||||||
df = pd.concat(dfs, ignore_index = True)
|
df = pd.concat(dfs, ignore_index=True)
|
||||||
|
|
||||||
df[2] = df[2].map(lambda c: c.rstrip(','))
|
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'])
|
print(df.at[df[2].idxmax(), 'filepath'])
|
||||||
|
Loading…
Reference in New Issue
Block a user