The rstrip function in python will delete any characters at the end with .xml or .csv, which is not preferable. The filename can be called gemll.xml which will give gem as after rstrip, it's the same for .csv.
filenames_in_GEM_DIRECTORY = [f.rstrip('.xml') for f in os.listdir(paras['GEM_DIRECTORY']) if f.endswith('.xml')]
filenames_in_GAPFILLED_RXNS_DIRECTORY = [
f.rstrip('.csv') for f in os.listdir(paras["GAPFILLED_RXNS_DIRECTORY"]) if f.endswith('.csv')
]
Hello there,
The
rstrip
function in python will delete any characters at the end with .xml or .csv, which is not preferable. The filename can be called gemll.xml which will give gem as after rstrip, it's the same for .csv.