O'Reilly logo

Mastering pandas by Femi Anthony

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4. Operations in pandas, Part I – Indexing and Selecting

In this chapter, we will focus on the indexing and selection of data from pandas objects. This is important since effective use of pandas requires a good knowledge of the indexing and selection of data. The topics that we will address in this chapter include the following:

  • Basic indexing
  • Label, integer, and mixed indexing
  • MultiIndexing
  • Boolean indexing
  • Operations on indexes

Basic indexing

We have already discussed basic indexing on Series and DataFrames in the previous chapter, but here we will include some examples for the sake of completeness. Here, we list a time series of crude oil spot prices for the 4 quarters of 2013, taken from IMF data: http://www.imf.org/external/np/res/commod/pdf/monthly/011014.pdf ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required