wesm/pandas — Issue #707: DataFrame.ix[n] for numerical (float) indices has an error
Author: james18
Created: 2012-01-27 23:10:52+00:00
State: open

So my understanding for a DataFrame with numerical indices, DataFrame.ix[i] indexes to the position where index=i, and not the ith row of the DataFrame. Although I find this to be confusing, i accept that this was the decision that was made.

However, the getting and setting with .ix is not consistent

from pandas import DataFrame
df = DataFrame(['a','b','c'],index=[0,0.5,1])
df.ix[1] = 'zoo'
print df.ix[1]

Current:
'b'

Expected:
'zoo'

Basically, df.ix[1] returns 'b', of index 0.5, instead of 'zoo' of index 1