Files


In [1]:
import pandas as pd

df = pd.read_csv("https://raw.githubusercontent.com/plotly/datasets/master/school_earnings.csv")

Plot the data frame


In [2]:
%matplotlib inline

In [3]:
df.plot()


Out[3]:
<matplotlib.axes._subplots.AxesSubplot at 0x7fa5a1918c50>

In [4]:
df.style


Out[4]:
School Women Men gap
0 MIT 94 152 58
1 Stanford 96 151 55
2 Harvard 112 165 53
3 U.Penn 92 141 49
4 Princeton 90 137 47
5 Chicago 78 118 40
6 Georgetown 94 131 37
7 Tufts 76 112 36
8 Yale 79 114 35
9 Columbia 86 119 33
10 Duke 93 124 31
11 Dartmouth 84 114 30
12 NYU 67 94 27
13 Notre Dame 73 100 27
14 Cornell 80 107 27
15 Michigan 62 84 22
16 Brown 72 92 20
17 Berkeley 71 88 17
18 Emory 68 82 14
19 UCLA 64 78 14
20 SoCal 72 81 9

In [19]:
df.sort_values(by=["Women"], ascending= 0)


Out[19]:
School Women Men gap
2 Harvard 112 165 53
1 Stanford 96 151 55
0 MIT 94 152 58
6 Georgetown 94 131 37
10 Duke 93 124 31
3 U.Penn 92 141 49
4 Princeton 90 137 47
9 Columbia 86 119 33
11 Dartmouth 84 114 30
14 Cornell 80 107 27
8 Yale 79 114 35
5 Chicago 78 118 40
7 Tufts 76 112 36
13 Notre Dame 73 100 27
16 Brown 72 92 20
20 SoCal 72 81 9
17 Berkeley 71 88 17
18 Emory 68 82 14
12 NYU 67 94 27
19 UCLA 64 78 14
15 Michigan 62 84 22