July 2019
Beginner to intermediate
740 pages
16h 52m
English
The addition of the Index class makes the Series class significantly more powerful than a NumPy array. The Index class gives us row labels, which enable selection by row; depending on the type of Index, we can provide a row number, a date, or even a string to select our row. It plays a key role in identifying entries in the data and is used for a multitude of operations in pandas, as we will see throughout this book. We access the Index object through the index attribute:
>>> place_index = place.index>>> place_indexRangeIndex(start=0, stop=5, step=1)
Note that this is a RangeIndex starting at index 0, with the last index at 4. The step of 1 indicates that the indices are each 1 apart, meaning that we have all the integers in that ...
Read now
Unlock full access