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)

Combining, Relating, and Reshaping Data

Data is often modeled as a set of entities, the logical structures of related values referenced by name (properties/variables), and with multiple samples or instances that are organized by rows. Entities tend to represent real-world things, such as a person, or in the Internet of Things, a sensor. Each specific entity and its measurements are then modeled using a single DataFrame.

There will often need to be various tasks performed upon and between entities in a model. It may be required to combine the data for multiple customer entities, which are sourced from multiple locations, into single pandas object. Customer and order entities are often related to find a shipping address for an order. It is also possible that data stored in one model may need to be reshaped into another model, simply because different sources model the same type...