Book Image

Learning Pandas

By : Michael Heydt
Book Image

Learning Pandas

By: Michael Heydt

Overview of this book

Table of Contents (19 chapters)
Learning pandas
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Summary


In this chapter, we examined several techniques of combining and reshaping data in one or more DataFrame objects. We started the chapter by examining how to combine data from multiple pandas objects. We saw how to concatenate multiple DataFrame objects both along the row and column axes. We then examined how pandas can be used to perform database-like joins and merges of data based on values in multiple DataFrame objects.

We then examined how to reshape data in DataFrame using pivots, stacking, and melting. We saw how each of these processes provides several variations on how to move data around by changing the shape of the indexes by moving data in and out of indexes.

We then finished the chapter with a brief but important example of how stacking data in a particular fashion can be used to provide significant performance benefits when accessing scalar data.

Even with all of this, we have not yet seen how to actually group data in a manner that will allow us to perform aggregate calculations...