from rpy2.robjects import r
from rpy2.robjects import pandas2ri
def data(name): return pandas2ri.ri2py(r[name])
df = data('iris')
%time df.describe()
df.shape
df.head()
# class distribution
print(df.groupby('Species').size())
%matplotlib inline
import matplotlib
import matplotlib.pyplot as plt
plt.rcParams["figure.figsize"] = (12, 9)
matplotlib.style.use('ggplot')
# box and whisker plots
df.plot(kind='box', subplots=True, layout=(2,2), sharex=False, sharey=False)
plt.show()
import seaborn as sns
sns.pairplot(df)
plt.show()