Pound sign problem

Lew Pitcher lew.pitcher at digitalfreehold.ca
Mon Apr 10 10:50:28 EDT 2017

David Shi wrote:

> In the data set, pound sign escape appears:
> u'price_currency': u'\xa3', u'price_formatted': u'\xa3525,000',
> When using table.to_csv after importing pandas as pd, an error message
> persists as follows: UnicodeEncodeError: 'ascii' codec can't encode
> character u'\xa3' in position 0: ordinal not in range(128)

There is no "pound sign" in ASCII[1]. Try changing your target encoding to 
something other than ASCII.

[1]: See http://std.dkuug.dk/i18n/charmaps/ascii for a list of valid ASCII 

Lew Pitcher
"In Skills, We Trust"
PGP public key available upon request

More information about the Python-list mailing list