max of a columns pandas code example

Example 1: pandas get index of max value in column

#use this to get the index of the max value of a column
max_index = column.idxmax()

Example 2: max columns in python

import pandas as pd
pd.set_option('display.max_rows', 500)
pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 1000)

Example 3: find min and max from dataframe column

max_value = column.max()

Example 4: Display max number of columns pandas

pd.options.display.max_columns = 999
pd.options.display.max_rows = 999