In the previous chapter, you learned how pandas makes it possible to read from any source and store structured data as a pandas object—Series, DataFrame, or panel. This chapter elaborates on how to slice and dice these objects. The row labels and column labels serve as identifiers that help us with selecting a subset of the data. Instead of a label, positional identifiers such as the row index and column index can also be used. Indexing and selecting are the most fundamental yet vital operations performed on data. The topics that will be addressed in this chapter include the following:
- Basic indexing
- Labels, integer, and mixed indexing
- Multi-indexing
- Boolean indexing
- Operations on indexes