In [8]:
import pandas as pd
import seaborn as sns
sns.set(context="notebook", style="whitegrid", palette="dark")

%matplotlib inline

In [9]:
df = pd.read_csv('ex1data1.txt', names=['population', 'profit'])

In [10]:
df.head()


Out[10]:
population profit
0 6.1101 17.5920
1 5.5277 9.1302
2 8.5186 13.6620
3 7.0032 11.8540
4 5.8598 6.8233

In [11]:
df.info()


<class 'pandas.core.frame.DataFrame'>
RangeIndex: 97 entries, 0 to 96
Data columns (total 2 columns):
population    97 non-null float64
profit        97 non-null float64
dtypes: float64(2)
memory usage: 1.6 KB

take a look at raw data


In [12]:
sns.lmplot('population', 'profit', df, size=6, fit_reg=False)


Out[12]:
<seaborn.axisgrid.FacetGrid at 0x114b9e080>

In [ ]: