You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried saving a DataFrame with Unicode labels using the .to_msgpack method. I didn't specify an encoding, because I assumed it would use UTF-8, which is the default encoding for Python in my locale (en_US.UTF-8) as well as just a sensible encoding to use in general.
Instead, it tried to encode labels in Latin-1, which failed. Latin-1 seems like a strangely antiquated default to use in modern code.
I can work around it by passing the encoding='utf-8' option, but it would be helpful if UTF-8 were the default, as it is in other Python I/O.
hmm, also I we should have encoding as a top-level option for .to_msgpack and .read_msgpack
its passed thru now, but should be part of the doc-string at least.
closespandas-dev#12170
Author: Ka Wo Chen <[email protected]>
Closespandas-dev#12277 from kawochen/API-12170 and squashes the following commits:
5adcf3b [Ka Wo Chen] API: to_msgpack and read_msgpack encoding defaults to utf-8
I am using Python 3.
I tried saving a DataFrame with Unicode labels using the
.to_msgpack
method. I didn't specify an encoding, because I assumed it would use UTF-8, which is the default encoding for Python in my locale (en_US.UTF-8) as well as just a sensible encoding to use in general.Instead, it tried to encode labels in Latin-1, which failed. Latin-1 seems like a strangely antiquated default to use in modern code.
I can work around it by passing the
encoding='utf-8'
option, but it would be helpful if UTF-8 were the default, as it is in other Python I/O.Here's my version information:
The text was updated successfully, but these errors were encountered: