October 2019
Beginner to intermediate
674 pages
16h 43m
English
The cummax(), cummin(), cumsum(), and cumprod() functions compute the maximum, minimum, sum, and product on a cumulative basis, respectively. Let's understand this by applying the cummax() function on the sample DataFrame:
sales_df.cummax()
The following is the output:

The skipna parameter in these functions provides control over handling NAs. It is set to True by default, and NAs are excluded. Consider the following DataFrame with NAs to understand the function of this parameter:
sales_df_na
The following is the output:
The cumsum() method can be applied ...
Read now
Unlock full access