How to do it...

  1. Load in the college dataset and execute the same operations as the previous recipe to get only the numeric columns that are of interest:
>>> college = pd.read_csv('data/college.csv', index_col='INSTNM')>>> cols = ['MD_EARN_WNE_P10', 'GRAD_DEBT_MDN_SUPP']>>> for col in cols:        college[col] = pd.to_numeric(college[col], errors='coerce')>>> college_n = college.select_dtypes(include=[np.number])>>> criteria = college_n.nunique() == 2>>> binary_cols = college_n.columns[criteria].tolist()>>> college_n = college_n.drop(labels=binary_cols, axis='columns')
  1. Find the maximum of each column with the max method:
>>> college_n.max().head()SATVRMID         765.0
SATMTMID         785.0
UGDS          151558.0
UGDS_WHITE         1.0
UGDS_BLACK         1.0
dtype: float64
  1. Use the ...

Get Numerical Computing with Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.