Skip to content

Advanced indexing .ix does not handle step with integer labels #185

@wesm

Description

@wesm

Should raise exception:

In [14]: import pandas.util.testing as tm

In [15]: df = tm.makeTimeDataFrame()

In [16]: df.index = np.arange(len(df))

In [17]: df.ix[:20:2, :]
Out[17]: 
    A       B        C         D     
0   0.7272  2.299    0.6004   -1.295 
1   0.1992 -0.6554  -0.6646    2.679 
2  -2.888  -0.8418   0.9162   -0.423 
3   0.1537  2.135    0.2564    0.7554
4   2.036   1.728   -1.055     0.59  
5  -0.1152 -1.131    0.1782    0.89  
6  -0.1432 -0.5045  -1.04     -1.235 
7   0.4615  0.6217   0.652     0.7405
8   0.9663 -0.8796   1.295    -1.333 
9  -0.2225 -0.6098  -0.1984   -0.534 
10  0.3549  2.245    1.554     1.43  
11 -1.241  -1.069   -1.85     -1.263 
12 -1.484  -0.01338  0.4773   -1.221 
13  0.8658  1.43    -0.005297  0.5183
14 -0.4009 -0.5202  -0.6209   -1.438 
15  0.756   0.2559   0.4617    0.3081
16  0.7314  1.809    1.922    -0.1331
17 -1.633  -1.026   -1.327    -0.3797
18  0.731  -0.1977   1.26      0.9189
19  0.1858 -0.9953   0.8936    1.237 
20 -1.195  -0.7265  -0.7423   -0.8248

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions