In [1]:
import pandas as pd
import glob, os
import global_vars
In [2]:
files = glob.glob(os.path.join(global_vars.DATA_DIR, 'submissions','subm16x16','*.csv'))
In [3]:
dfs = list()
for file in files:
dfs.append(pd.read_csv(file, index_col=0))
In [4]:
sample_subm = pd.read_csv(os.path.join(global_vars.DATA_DIR, 'sample_submission.csv'))
subm = pd.concat(dfs)
In [5]:
def make_index(sub):
sub['key'] = sub.apply(lambda x: x[0]+str(x[1]), axis=1)
sub = sub.set_index('key', drop=True)
return sub
In [6]:
sample_subm = make_index(sample_subm)
subm = make_index(subm)
subm = subm.reindex(sample_subm.index)
In [7]:
subm = subm.set_index('ImageId', drop=True)
subm.to_csv('debug_subm_16x16.csv')
Now submit solution and note any reported net topology errors, etc.
In [ ]: