`DataFrame.corr()` computes pairwise correlations among numeric columns. Use it as a quick check for how two measured quantities move together before digging into rows, groups, or plots. section 13.3 section 3.8
Compare tuition and admission rates
Select the two columns first, then call `corr()` to return their correlation result. This keeps the question focused: is out-of-state tuition related to admission rate in the institution data? section 13.3
institutions_df[['ADM_RATE', 'TUITIONFEE_OUT']].corr()
The listing applies `corr()` to `ADM_RATE` and `TUITIONFEE_OUT`, producing the correlation for that two-column comparison. section 13.3
A correlation result is a starting point, not the whole investigation. Follow it with a scatter plot to inspect the relationship directly, and add graduate earnings as color when a third measure may add context. section 13.3
Use a compact workflow when exploring a relationship:
- Choose numeric columns that answer one concrete question. section 13.3
- Run `corr()` on the selected DataFrame columns. section 13.3
- Inspect the same columns in a scatter plot rather than relying on the single result alone. section 13.3
- Try a different pair, such as completion rate and admission rate, to extend the analysis. section 13.3
