Cumulative Operations
Explore how to apply cumulative operations such as cumulative sum, product, maximum, and minimum using pandas. Learn to leverage these methods to analyze data sequences, track running totals, and identify patterns across datasets.
We'll cover the following...
Overview
Cumulative operations are mathematical operations that involve the accumulation of intermediate results to produce the final result. Examples of cumulative operations include summing a series of numbers, calculating a product of a sequence of numbers, and finding the running total of a list of values. These operations can be useful in numerous situations, such as gaining insights into the data distribution and applying the Pareto principle (aka 80/20 rule) to identify patterns and prioritize action.
The pandas methods that allow us to perform cumulative operations are cumsum(), cumprod(), cummax() and cummin().
Sum and product
Before exploring cumulative ...