![]() |
VOOZH | about |
Python Pandas max() function returns the maximum of the values over the requested axis.
Syntax: dataframe.max(axis)
where,
- axis=0 specifies column
- axis=1 specifies row
To get the maximum value in a dataframe row simply call the max() function with axis set to 1.
Syntax: dataframe.max(axis=1)
Output:
👁 ImageTo get the maximum value in a column simply call the max() function using the axis set to 0.
Syntax: dataframe.max(axis=0)
Output:
👁 ImageTo get the maximum value in a particular column call the dataframe with the specific column name and max() function.
Syntax: dataframe['column_name'].max()