How To Create A Pandas Dataframe Containing Columns With Special Characters?
I try to create a Pandas data-frame from a list of dictionaries: df = pandas.DataFrame(ls, columns = cols) As a result I get the following error message: UnicodeDecodeError: 'asci
Solution 1:
You need to ensure that your default encoding is set to unicode; it is ascii by default. Try
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
Post a Comment for "How To Create A Pandas Dataframe Containing Columns With Special Characters?"