I have a Pandas Dataframe generated from a database, which has data with mixed encodings. For example:
+----+-------------------------+----------+-----------
sqlite3 returns Unicodes by default for TEXT fields. Everything was set up to work before you introduced the table()
function from an external source (that you did not provide in your question).
The table()
function has str()
calls which do not provide an encoding, so ASCII is used to protect you.
You need to re-write table()
not to do this, especially as you've got Unicode objects. You may have some success by simply replacing str()
with unicode()