Since one column of my pandas dataframe has nan value, so when I want to get the max value of that column, it just return error.
nan
>>> d
You can use NumPy's help with np.nanmax, np.nanmin :
NumPy
In [28]: df Out[28]: A B C 0 7 NaN 8 1 3 3 5 2 8 1 7 3 3 0 3 4 8 2 7 In [29]: np.nanmax(df.iloc[:, 1].values) Out[29]: 3.0 In [30]: np.nanmin(df.iloc[:, 1].values) Out[30]: 0.0