In [1]:
import pandas as pd
import seaborn as sns
%matplotlib inline
In [2]:
df = pd.read_csv('ex2data1.txt', names=['exam1', 'exam2', 'admitted'])
print(df.shape)
df.head()
Out[2]:
In [3]:
df.describe()
Out[3]:
In [7]:
sns.set(context="notebook", style="darkgrid", palette=sns.color_palette("RdBu", 2))
sns.lmplot('exam1', 'exam2', hue='admitted', data=df,
size=6,
fit_reg=False,
scatter_kws={"s": 50}
)
Out[7]:
In [ ]: