Skip to content

read_msgpack compress kwarg not getting passed #8031

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
brifordwylie opened this issue Aug 15, 2014 · 1 comment
Closed

read_msgpack compress kwarg not getting passed #8031

brifordwylie opened this issue Aug 15, 2014 · 1 comment

Comments

@brifordwylie
Copy link

The compress kwarg isn't getting passed down the chain when using pd.read_msgpack(buffer).

def read_msgpack(path_or_buf, iterator=False, **kwargs):
         ...
        def read(fh):
        l = list(unpack(fh))   (which then goes to decode() and unconvert() )

Replication:

df = pd.DataFrame([{'foo','bar'}])
packed_df = df.to_msgpack(compress='zlib')
pd.read_msgpack(packed_df, compress='zlib')

...
    obj.get('compress'))
  File "/Users/briford/myPVE/workbench/lib/python2.7/site-packages/pandas/io/packers.py", line 258, in unconvert
    return np.fromstring(values.encode('latin1'), dtype=dtype)
ValueError: string size must be a multiple of element size

Versions:


INSTALLED VERSIONS
------------------
commit: None
python: 2.7.6.final.0
python-bits: 64
OS: Darwin
OS-release: 13.3.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8

pandas: 0.14.1
nose: 1.3.3
Cython: 0.20.2
numpy: 1.8.1
scipy: None
statsmodels: None
IPython: 2.2.0
sphinx: 1.2.2
patsy: None
scikits.timeseries: None
dateutil: 2.2
pytz: 2014.4
bottleneck: None
tables: None
numexpr: None
matplotlib: None
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
rpy2: None
sqlalchemy: None
pymysql: None
psycopg2: None
@jreback
Copy link
Contributor

jreback commented Aug 15, 2014

this is not implemented see #3832. welcome a pull-request to do it. Did not find that it helped all that much though (the compress was from a previous iteration of the code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants