In [15]:
## make imports
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
%matplotlib inline
sns.set(style="ticks", color_codes=True)
## load the iris data
iris = sns.load_dataset("iris")
g = sns.pairplot(iris)
In [19]:
g = sns.pairplot(iris, hue="species",palette="husl")
In [17]:
iris.info()
In [18]:
iris.head()
Out[18]:
In [20]:
iris.groupby('species').mean()
Out[20]:
In [26]:
## make a histogram the pandas way
ax = iris["sepal_length"].plot(kind='hist')
ax.set_title("my title");
In [25]:
## make a histogram the matplotlib way
fig = plt.figure(figsize=(10,8))
ax = fig.add_subplot(1,1,1)
ax.hist(iris['sepal_length']);
In [ ]:
## clustering
# import some data to play with
#iris = datasets.load_iris()
#X = iris.data[:, :2] # we only take the first two features.
#Y = iris.target