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)

Performing numerical methods on pandas objects

pandas provides a rich set of functions and operations that facilitate the ability to perform arithmetic operations and to calculate various numerical characteristics of data. In this section, we will examine many of these, including:

  • Performing arithmetic on a DataFrame or Series
  • Getting the counts of values
  • Determining unique values (and their counts)
  • Finding minimum and maximum values
  • Locating the n-smallest and n-largest values
  • Calculating accumulated values

Performing arithmetic on a DataFrame or Series

Arithmetic operations can be performed on a DataFrame (and Series) using the +, -, /, and * operators. While these may seem trivial in nature, pandas adds a powerful twist...