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 certain metrics.
Getting ready
This recipe discovers the school that has the maximum value for each numeric column and styles the DataFrame in order to highlight the information so that it is easily consumed by a user.
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 ... PCTFLOAN float64 UG25ABV float64 MD_EARN_WNE_P10 object GRAD_DEBT_MDN_SUPP object Length: 26, dtype: object
Â
Â
Â
Â
- All the other columns besides
CITY
andSTABBR
appear to be numeric. Examining the data types from the...