How it works...

The ix indexing method allows mixing integer locations with references by labels. 

In the first example, df.ix[100024, 1], the row is indexed by the DataFrame index and the column is referred to by position. Notice that, if the DataFrame index is an integer, ix interprets the location as a reference to the index. In this case, to index rows by position it is necessary to use the iloc method.

In the second example, df.ix[[201024,202034], :2], a subset of the table is selected. The rows are specified as a list of indexes and the columns are specified as a slice given by a numerical range.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset