I have created a package using the encoding utf-8.
When calling a function, it returns a DataFrame
, with a column coded in utf-8.
When using IPytho
I had the same problem recently, and indeed setting the default encoding to UTF-8 did the trick:
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
Running sys.getdefaultencoding()
yielded 'ascii'
on my environment (Python 2.7.3), so I guess that's the default.
Also see this related question and Ian Bicking's blog post on the subject.