On 10 April 2017 at 15:17, David Shi via Python-list
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'
On 2017-04-12 02:29, Steve D'Aprano wrote:
> >> In 2017, unless you are reading from old legacy files created
> >> using a non-Unicode encoding, you should just use UTF-8.
> >
> > Thanks for your opinion. My opinion differs.
>
> What would you suggest then, if not UTF-8?
>
> My personal favo
On Wed, 12 Apr 2017 02:23 am, Lew Pitcher wrote:
> I recommend whatever encoding is appropriate for the output.
There are multiple encodings that are appropriate for ASCII + pound sign.
How should the OP choose between them without guidance? If he understood
the issue well enough to make an info
On Wed, Apr 12, 2017 at 2:23 AM, Lew Pitcher
wrote:
> Chris Angelico wrote:
>
>> On Wed, Apr 12, 2017 at 1:24 AM, Lew Pitcher
>> wrote:
>>>
>>> What in "Try changing your target encoding to something other than ASCII"
>>> is encouragement to use "old legacy encodings"?
>>>
In 2017, unless yo
On Wed, 12 Apr 2017 01:24 am, Lew Pitcher wrote:
[...]
>>> There is no "pound sign" in ASCII[1]. Try changing your target encoding
>>> to something other than ASCII.
>>
>> Please don't encourage the use of old legacy encodings.
>
> I wonder if you actually read my reply.
Of course I did.
> W
Chris Angelico wrote:
> On Wed, Apr 12, 2017 at 1:24 AM, Lew Pitcher
> wrote:
>>
>> What in "Try changing your target encoding to something other than ASCII"
>> is encouragement to use "old legacy encodings"?
>>
>>> In 2017, unless you are reading from old legacy files created using a
>>> non-Uni
On Wed, Apr 12, 2017 at 1:24 AM, Lew Pitcher
wrote:
>
> What in "Try changing your target encoding to something other than ASCII" is
> encouragement to use "old legacy encodings"?
>
>> In 2017, unless you are reading from old legacy files created using a
>> non-Unicode encoding, you should just us
Steve D'Aprano wrote:
> On Tue, 11 Apr 2017 12:50 am, Lew Pitcher wrote:
>
>> David Shi wrote:
>>
>>> In the data set, pound sign escape appears:
>>> u'price_currency': u'\xa3', u'price_formatted': u'\xa3525,000',
>
> That looks like David is using Python 2.
>
>>> When using table.to_csv after
On Tue, 11 Apr 2017 12:50 am, Lew Pitcher wrote:
> David Shi wrote:
>
>> In the data set, pound sign escape appears:
>> u'price_currency': u'\xa3', u'price_formatted': u'\xa3525,000',
That looks like David is using Python 2.
>> When using table.to_csv after importing pandas as pd, an error mess
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 pos
David Shi via Python-list 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
> characte
David Shi via Python-list writes:
> When using table.to_csv after importing pandas as pd
I don't know much about that library. What does its documentation say
for the ‘table.to_csv’ function?
Can you write a *very short* complete example, that we can run to
demonstrate the same behaviour you ar
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 ra
13 matches
Mail list logo