Unexpected Unicode Values In Dataframe?
I can't find why this is happening. Can i get a justification ? using pandas in python, if I write in the console: pd.io.json.read_json('{'rCF':{'values':0.05}}') I got printed a
Solution 1:
json
always decodes to Unicode:
>>> import json
>>> json.loads('{"a":"b"}')
{u'a': u'b'}
It's just that in your former case a print
or the equivalent somewhere inside pandas
is hiding this, as would, e.g:
>>>x = _>>>for k in x: print k...
a
after the above snippet; but when you print
(or the like) a container, you get to see the more precise repr
of the container's items.
Post a Comment for "Unexpected Unicode Values In Dataframe?"