Skip to content

BUG: HDFStore.select ignores start and stop parameters #8287

Closed
@TomAugspurger

Description

@TomAugspurger

Or I'm doing this wrong

In [1]: df = pd.DataFrame(np.random.randn(10, 4))

In [3]: df.to_hdf('test.h5', 'df')

In [4]: with pd.get_store('test.h5') as store:
   ...:     df_ = store.select('df', start=0, stop=2)
   ...:     

In [5]: df_
Out[5]: 
          0         1         2         3
0  1.504814  0.209394 -0.360703 -0.339684
1  0.272718  0.768927 -1.061029  0.919742
2  0.315669  0.337206 -1.358443  1.223715
3 -0.414095  0.015512 -0.320634  0.703489
4  0.889063 -0.194524  1.342604  1.078340
5 -1.636940 -0.725176 -0.096803  0.346356
6 -1.359400 -0.588007  0.651720 -0.127604
7 -1.613468  1.131560 -0.074385 -0.830540
8  0.176463 -1.298918 -0.215537  0.984911
9 -0.372920  0.898528 -0.869616  1.178704

Docstring says:

start : integer (defaults to None), row number to start selection
stop  : integer (defaults to None), row number to stop selection

I can look tomorrow (catching up on pandas stuff all day tomorrow hopefully)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions