I trouble in how do parse multiple xml file and process it as dataframe in Python
问题 I want parse multi xml file into dataframe. There are same xpath. I have used element tree and os Python library.It can parse all the files, but it print out empty dataframe. However if code without multiple file, it can work properly. mypath = r'C:\Users\testFile' files = [path.join(mypath, f) for f in listdir(mypath) if f.endswith('.xml')] for file in files: xtree = et.parse(file) xroot = xtree.getroot() df_cols=['value'] out_xml=pd.DataFrame(columns=df_cols) for node in xroot.findall(r'.