Highlighting the maximum value from each column
The college dataset has many numeric columns describing different metrics about each school. Many people are interested in schools that perform the best for specific metrics.
This recipe discovers the school that has the maximum value for each numeric column and styles the DataFrame to highlight the information.
How to do it…
- Read the college dataset with the institution name as the index:
>>> college = pd.read_csv( ... "data/college.csv", index_col="INSTNM" ... ) >>> college.dtypes CITY object STABBR object HBCU float64 MENONLY float64 WOMENONLY float64 ... PCTPELL float64 PCTFLOAN float64 UG25ABV float64 MD_EARN_WNE_P10 object GRAD_DEBT_MDN_SUPP object Length: 26, dtype: object
- All the other columns...