Book Image

Learning pandas - Second Edition

By : Michael Heydt
Book Image

Learning pandas - Second Edition

By: Michael Heydt

Overview of this book

You will learn how to use pandas to perform data analysis in Python. You will start with an overview of data analysis and iteratively progress from modeling data, to accessing data from remote sources, performing numeric and statistical analysis, through indexing and performing aggregate analysis, and finally to visualizing statistical data and applying pandas to finance. With the knowledge you gain from this book, you will quickly learn pandas and how it can empower you in the exciting world of data manipulation, analysis and science.
Table of Contents (16 chapters)

The pandas index types

The pandas provides many built-in indexes. Each of the index types is designed for optimized lookups based upon a specific data type or pattern of data. Let's look at several of them that are common used.

The fundamental type - Index

This type of index is the most generic and represents an ordered and sliceable set of values. The values that it contains must be hashable Python objects. This is because the index will use this hash to form an efficient lookup of values associated with the value of that object. While hash lookup is preferred over linear lookup, there are other types of indexes that can be further optimized.

It is common that the columns index will be of this generic type. The following...