Indexing Data

An index is a tool for optimized look up of values from a series or DataFrame. They are a lot like a key in a relational database, but more powerful. They provide the means of alignment for multiple sets of data and also carry semantics for how to handle various tasks with data such as resampling to different frequencies.

Much of the modeling that you will perform with pandas depends critically on how you set up your indexes. A properly implemented index will optimize performance and be an invaluable tool in driving your analysis.

We have previously used indexes briefly, and in this chapter, we will dive quite a bit deeper. During this deep dive, we will learn more about:

  • The importance of indexes
  • The types of pandas indexes, including RangeIndex, Int64Index, CategoricalIndex, Float64Index, Datetimeindex, and PeriodIndex
  • Setting and resetting an index
  • Creating hierarchical indexes
  • Selection of data using hierarchical indexes
..................Content has been hidden....................

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