Distribution de l'intrigue Seaborn
x = np.random.normal(size=100)
sns.distplot(x);
Proud Penguin
x = np.random.normal(size=100)
sns.distplot(x);
x = 2
y = 2
fig, ax = plt.subplots(x, y, figsize=(32, 72))
col = 0
column = df_train.drop('id', axis=1).columns
for i in range(x):
for j in range(y):
sns.distplot(df[column[col]], color='purple', ax=ax[i][j])
ax[i][j].set_title(*[column[col]])
col+=1
import numpy as np
import pandas as pd
from sklearn.datasets import load_iris
import seaborn as sns
iris = load_iris()
iris = pd.DataFrame(data=np.c_[iris['data'], iris['target']],
columns=iris['feature_names'] + ['target'])
# Sort the dataframe by target
target_0 = iris.loc[iris['target'] == 0]
target_1 = iris.loc[iris['target'] == 1]
target_2 = iris.loc[iris['target'] == 2]
sns.distplot(target_0[['sepal length (cm)']], hist=False, rug=True)
sns.distplot(target_1[['sepal length (cm)']], hist=False, rug=True)
sns.distplot(target_2[['sepal length (cm)']], hist=False, rug=True)
sns.plt.show()