Series.iloc
danfo.Series.iloc()
Parameters
Type
Description
Default
rows
Array or String slice
Array, string slice, index of row positions boolean mask to filter by.
Examples
.iloc()
is primarily integer position based (from 0
to length-1
of the axis).
Allowed inputs are:
An integer, e.g.
5
.A list or array of integers, e.g.
[4, 3, 0]
.A boolean mask. E.g [ true, false, false ]
A string slice object with ints, e.g.
"1:7"
Note: only **** the start label is included, and the end label is ignored.
.iloc
will raiseIndexError
if a requested indexer is out-of-bounds.
Indexing specific rows by index
Index by a slice of row
By specifying a start index in a slice, all values after that index are returned.
Slice Series by boolean condition
Last updated
Was this helpful?