When reading data from excel tables with an xlrd package, the output often has a prefix u’ or something similiar (like, in one case, it had a \u2013 instead of a ‘-‘ character). Why is this and which are the characters i need to look out for, as I’m going to have to parse some information from the spreadsheet cells.
Here’s an example:
>>> wb = xlrd.open_workbook('tellimusleht.xls')
>>> sh = wb.sheet_by_index(0).row_values(5)
[2.0, u'aken sisseavanev, pakett, aluliist, ilma petekata parem', 552.0, 1729.0, 2.0, u'Sp.Barbados 4*6 \u2013 1 maja ']
Thank you for your help!
The
udenotes a unicode string.\u2013is the Unicode EN DASH character, which is displayed as–, but it isn’t the same as a regular dash: