O'Reilly logo

Learning pandas - Second Edition by Michael Heydt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Calculating accumulated values

Accumulations are statistical methods that determine a value by continuously applying the next value in a Series to the running result. Good examples are the cumulative product and cumulative sum of a Series. The following code demonstrates the calculation of a cumulative product.

The result is another Series that represents the accumulated value at each position. Here is the calculation of the cumulative sum of the same Series.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required