I am reading in an excel file and then spitting out a sheet from that excel file, both using pandas. However, I am getting an error as follows:
try:
fao_file = pd.ExcelFile('FAO_Crops_area_harvested_Data.xlsx')
except:
logging.info('Error reading excel file on FAO data')
df = fao_file.parse('Production_Crops_E_All_Data.csv')
df.to_csv('out.csv')
I get the following error:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf4' in position 1: ordinal not in range(128)
The excel file is available here: https://umd.box.com/s/73dqgf8npqquq3icw6w2z8xq73vob3me