BUG: HDFStore.select_as_multiple doesn't respect start/stop kwargs · Issue #16209 · pandas-dev/pandas (original) (raw)
import pandas as pd
df = pd.DataFrame({"foo": [1, 2], "bar": [1, 2]})
with pd.HDFStore("foo.h5", 'w') as store: store.append_to_multiple({'selector': ['foo'], 'data': None}, df, selector='selector') single_row = store.select_as_multiple(['selector', 'data'], selector='selector', start=0, stop=1) assert len(single_row) == 1, "requested 1 row, got back {}".format(len(single_row))
Currently select_as_multiple returns the entire table. I would expect, if start=0 and stop=1, for just one row to be returned
INSTALLED VERSIONS ------------------ commit: None python: 2.7.12.final.0 python-bits: 64 OS: Linux OS-release: 2.6.32-642.15.1.el6.centos.plus.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_US.UTF-8 LOCALE: None.None
pandas: 0.19.2
nose: None
pip: 9.0.1
setuptools: 32.3.1.post20170108
Cython: 0.25.2
numpy: 1.11.3
scipy: 0.18.1
statsmodels: 0.8.0
xarray: 0.8.2
IPython: 5.1.0
sphinx: 1.5.3
patsy: 0.4.1
dateutil: 2.6.0
pytz: 2016.10
blosc: None
bottleneck: 1.2.0
tables: 3.4.0
numexpr: 2.6.1
matplotlib: None
openpyxl: None
xlrd: 1.0.0
xlwt: None
xlsxwriter: 0.9.6
lxml: None
bs4: 4.5.3
html5lib: 0.999
httplib2: None
apiclient: None
sqlalchemy: 1.1.5
pymysql: 0.7.9.None
psycopg2: None
jinja2: 2.8
boto: None
pandas_datareader: None