Book Image

Pandas 1.x Cookbook - Second Edition

By : Matt Harrison, Theodore Petrou
Book Image

Pandas 1.x Cookbook - Second Edition

By: Matt Harrison, Theodore Petrou

Overview of this book

The pandas library is massive, and it's common for frequent users to be unaware of many of its more impressive features. The official pandas documentation, while thorough, does not contain many useful examples of how to piece together multiple commands as one would do during an actual analysis. This book guides you, as if you were looking over the shoulder of an expert, through situations that you are highly likely to encounter. This new updated and revised edition provides you with unique, idiomatic, and fun recipes for both fundamental and advanced data manipulation tasks with pandas. Some recipes focus on achieving a deeper understanding of basic principles, or comparing and contrasting two similar operations. Other recipes will dive deep into a particular dataset, uncovering new and unexpected insights along the way. Many advanced recipes combine several different features across the pandas library to generate results.
Table of Contents (17 chapters)
15
Other Books You May Enjoy
16
Index

Index

Symbols

.add method

working 261

.apply method

code, inspecting 567, 569, 570, 572, 574

performance 558, 560, 561, 562

performance, improving with Dask 562, 564, 565, 567

performance, improving with Pandarell 562, 564, 565, 567

performance, improving with Swifter 562, 564, 566, 567

working 561

.cummax method

working

.describe method 139

.groupby method

using, for DataFrames with DatetimeIndex

.idxmax method

working 279, 281

.join method 417, 419, 421, 424, 426

.merge method 417, 419, 421, 423, 426

A

aggregation

defining 286, 288

working 289

aggregation function

customizing, with *args parameter 307, 309, 310, 311

customizing, with **kwargs parameter 307, 309, 311

grouping with 303, 304, 305, 306

area charts

stacking, to discover trends 532, 533, 535, 536, 538

arithmetic operator

method 32

axis levels

renaming 384, 385, 386, 387, 388, 389

...