Could anyone explain to me the y axis of first four plots

Hi.
I have finished the Exploratory Data Visualisation course. In forth plot in attached notebook where median salaries for each major category are plotted, I dont understand why “Engineering” bar reached 16k on y axis as highest value is 11k in the column. Could anyone help me here.
Visualizing Earnings Based On College Majors.ipynb (258.1 KB)

Click here to view the jupyter notebook file in a new tab

Acutally, Major_category == Engineering contains various Major like

PETROLEUM ENGINEERING, MINING AND MINERAL ENGINEERING, METALLURGICAL ENGINEERING, NAVAL ARCHITECTURE AND MARINE ENGINEERING, CHEMICAL ENGINEER, ETC

So, when you run this code

recent_grads.groupby('Major_category')['Median'].sum()

It sum Median for all Engineering Majors. And it comes approx 1664100.

11k is the median for any one Engineering Major which has Major_category Engineering.

I think you will understand why this happens.

1 Like