For the Series object (let\'s call it s), pandas offers three types of addressing.
s.iloc[] -- for integer position addressing;
s.loc[] -- for index label addres
Note: As of Pandas v0.20, .ix
indexer is deprecated in favour of .iloc
/ .loc
.
For a Series
, .ix
is equivalent of []
, the getitem
syntax. .ix/.loc
support multi-axis indexing, which for a Series does not matter (only has 1 axis), and hence is there for compatibility.
e.g.
DataFrame(...).ix[row_indexer,column_indexer]
Series(...).ix[row_indexer]
.ix
itself is an 'older' method that tries to figure out what you want when presented with label or positional (integer) indexing. This is why .loc/.iloc
were introduced in 0.11 to provide indexing choice by the user.