I am learning some begineer level bigdata and trying to read large xml files to convert them to pandas DataFrame using ElemetTree Iterparse however I got an ParserError about invalid character
import numpy as np
import pandas as pd
import xml.etree.ElementTree as et
def read_xml(filepath,tag,*args):
atts=[arg for arg in args]
dict_list = []
for _, elem in et.iterparse(filepath, events=("end",)):
tempdict={}
if elem.tag == tag:
for i in range(len(atts)):
tempdict[atts[i]]=elem.attrib[atts[i]]
dict_list.append(tempdict)
elem.clear()
return pd.DataFrame(dict_list)
When I check the some lines near the exception I got this:
and I suppose the problem is about those characters 



this answer explain what those characters mean, but still I dont know how to solve it. https://stackoverflow.com/a/15722541/5711393
