Skip to content

.ix strange bug for float index #780

@xdong

Description

@xdong

In [1]: import pandas

In [2]: index = [52195.504153, 52196.303147, 52198.369883]

In [3]: a = pandas.DataFrame(randn(3, 2), index)

In [4]: a
Out[4]:
0 1
52195.504153 1.367681 0.243237
52196.303147 -0.745796 -1.054106
52198.369883 -1.462461 -0.683286

In [5]: a.ix[52195.:52196.]
Out[5]:
Empty DataFrame
Columns: array([0, 1])
Index: array([], dtype=object)

In [6]: a.ix[52195.1:52196.5]
Out[6]:
Empty DataFrame
Columns: array([0, 1])
Index: array([], dtype=object)

In [7]: a.ix[52195.1:52196.6]
Out[7]:
0 1
52195.504153 1.367681 0.243237
52196.303147 -0.745796 -1.054106

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