Book: Effective Pandas
![Effective Pandas Cover](https://abittechnical.work/wp-content/uploads/2022/03/effective-pandas-cover-1024x536.jpg)
Harrison, M. (2021) Effective Pandas: Patterns for Data Manipulation. Independently published.
Pandas is a Python library for data analysis and visualization, and I use it almost every day. Python Podcast's interview with the Pandas guru Matt Harrison led me to buy his book "Effective Pandas." It walks you through the library and demonstrates the way to use it effectively in data analyses. I'm just halfway through but am much impressed at the tips and the philosophy beneath, and in particular, at the simple but revolutionary "chaining" syntax, in which you write a method per line, chained one after another (see the example code below.) It makes code development much easier because you only need to add or remove '#' at the beginning of a line to toggle the method. Furthermore, each line serves as a step in the recipe, improving readability and shareability. The ebook is available at $39.
(season2017.resample("M")
.sum()
.div(season2017.sum())
.mul(100)
.rename(lambda idx: idx.month_name())
.plot.pie()
)
Table of Contents
You can preview Chapter 27, Reshaping By Pivoting and Grouping here. Matt talks about chaining and a few other techniques also in a Youtube video. I will go through the book in the next post.
One thought on “Book: Effective Pandas”