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
DataFrame.to_msgpack() handles tuples - except when they are of length 1 and no string column is present.
This is unexpected, the round tripping shoudl neither depend on the tuples being longer nor on the dtypes of other columns.
Expected Output
mixed len tuples -> ok
len(1) tuples -> ok
len(1) tuples+str_column -> ok
len(1) tuples+categorical -> ok
len(mixed) tuples+int -> ok
###actual output
mixed len tuples -> ok
len(1) tuples -> different
0 one
1 two
Name: x, dtype: object
len(1) tuples+str_column -> ok
len(1) tuples+categorical -> different
0 one
1 two
Name: x, dtype: object
Code Sample, a copy-pastable example if possible
Problem description
DataFrame.to_msgpack() handles tuples - except when they are of length 1 and no string column is present.
This is unexpected, the round tripping shoudl neither depend on the tuples being longer nor on the dtypes of other columns.
Expected Output
mixed len tuples -> ok
len(1) tuples -> ok
len(1) tuples+str_column -> ok
len(1) tuples+categorical -> ok
len(mixed) tuples+int -> ok
###actual output
mixed len tuples -> ok
len(1) tuples -> different
0 one
1 two
Name: x, dtype: object
len(1) tuples+str_column -> ok
len(1) tuples+categorical -> different
0 one
1 two
Name: x, dtype: object
Output of
pd.show_versions()
This is on todays master.
INSTALLED VERSIONS
commit: None
python: 3.7.2.final.0
python-bits: 64
OS: Linux
OS-release: 4.15.0-43-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: None
LOCALE: en_US.UTF-8
pandas: 0.25.0.dev0+301.gf2bcb9f00
pytest: 3.10.1
pip: 19.0.1
setuptools: 40.8.0
Cython: 0.29.4
numpy: 1.16.1
scipy: 1.2.0
pyarrow: 0.12.0
xarray: None
IPython: 7.3.0
sphinx: None
patsy: 0.5.1
dateutil: 2.8.0
pytz: 2018.9
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: 0.4.0
matplotlib: 3.0.2
openpyxl: None
xlrd: 1.2.0
xlwt: 1.3.0
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None
None
The text was updated successfully, but these errors were encountered: