Python | Pandas dataframe.cummax() Last Updated : 16 Nov, 2018 Summarize Comments Improve Suggest changes Share Like Article Like Report Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas dataframe.cummax() is used to find the cumulative maximum value over any axis. Each cell is populated with the maximum value seen so far. Syntax: DataFrame.cummax(axis=None, skipna=True, *args, **kwargs) Parameters: axis : {index (0), columns (1)} skipna : Exclude NA/null values. If an entire row/column is NA, the result will be NA Returns: cummax : Series Example #1: Use cummax() function to find the cumulative maximum value along the index axis. Python3 # importing pandas as pd import pandas as pd # Creating the dataframe df = pd.DataFrame({"A":[5, 3, 6, 4], "B":[11, 2, 4, 3], "C":[4, 3, 8, 5], "D":[5, 4, 2, 8]}) # Print the dataframe df Output : Now find the cumulative maximum value over the index axis Python3 1== # To find the cumulative max df.cummax(axis = 0) Output : Example #2: Use cummax() function to find the cumulative maximum value along the column axis. Python3 # importing pandas as pd import pandas as pd # Creating the dataframe df = pd.DataFrame({"A":[5, 3, 6, 4], "B":[11, 2, 4, 3], "C":[4, 3, 8, 5], "D":[5, 4, 2, 8]}) # To find the cumulative max along column axis df.cummax(axis = 1) Output : Example #3: Use cummax() function to find the cumulative maximum value along the index axis in a data frame with NaN value. Python3 # importing pandas as pd import pandas as pd # Creating the dataframe df = pd.DataFrame({"A":[5, 3, None, 4], "B":[None, 2, 4, 3], "C":[4, 3, 8, 5], "D":[5, 4, 2, None]}) # To find the cumulative max df.cummax(axis = 0, skipna = True) Output : Comment More infoAdvertise with us Next Article Python | Pandas dataframe.min() S Shubham__Ranjan Follow Improve Article Tags : Technical Scripter Python Python-pandas Python pandas-dataFrame Pandas-DataFrame-Methods +1 More Practice Tags : python Similar Reads Python | Pandas dataframe.cumsum() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas dataframe.cumsum() is used to find the cumulative sum value over any axis. Each 2 min read Python | Pandas dataframe.cummin() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas dataframe.cummin() is used to find the cumulative minimum value over any axis. 2 min read Python | Pandas dataframe.cumprod() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas dataframe.cumprod() is used to find the cumulative product of the values seen s 2 min read Python | Pandas dataframe.max() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas dataframe.max() function returns the maximum of the values in the given object. 2 min read Python | Pandas dataframe.min() Python is a great language for doing data analysis, primarily because of the fantastic ecosystem of data-centric python packages. Pandas is one of those packages and makes importing and analyzing data much easier. Pandas dataframe.min() function returns the minimum of the values in the given object. 2 min read Pandas dataframe.aggregate() | Python Dataframe.aggregate() function is used to apply some aggregation across one or more columns. Aggregate using callable, string, dict or list of string/callables. The most frequently used aggregations are:sum: Return the sum of the values for the requested axismin: Return the minimum of the values for 2 min read Like