In [1]:
import numpy as np
from numpy.random import randn
import pandas as pd

from scipy import stats

import matplotlib as mpl
import matplotlib.pyplot as plt
import seaborn as sns

%matplotlib inline

In [2]:
dataset = randn(100)

In [3]:
sns.distplot(dataset, bins=25)


Out[3]:
<matplotlib.axes._subplots.AxesSubplot at 0x11771cad0>

In [4]:
sns.distplot(dataset, bins=25, rug=True, hist=False)


Out[4]:
<matplotlib.axes._subplots.AxesSubplot at 0x119cacd50>

In [5]:
sns.distplot(dataset, bins=25, kde_kws={'color': 'indianred', 'label': 'KDE PLOT'},
            hist_kws={'color': 'blue', 'label': 'HIST'})


Out[5]:
<matplotlib.axes._subplots.AxesSubplot at 0x11a755610>

In [6]:
from pandas import Series

In [7]:
ser1 = Series(dataset, name='my_data')

In [8]:
ser1


Out[8]:
0    -1.324396
1     0.396416
2     0.538257
3    -0.811216
4    -1.272062
5     0.422215
6    -1.047410
7    -0.879470
8    -0.423506
9     0.626135
10    1.913751
11    0.615632
12   -1.056553
13    0.145857
14    0.658656
15    0.517830
16    0.405213
17    0.958911
18    0.766645
19    1.014396
20    0.187880
21    0.357699
22   -1.238648
23    0.469914
24   -0.944427
25    0.426316
26   -0.227735
27   -0.160515
28   -0.941235
29   -1.228435
        ...   
70    0.483377
71   -0.616592
72   -0.390998
73   -0.630928
74    1.283612
75    1.752201
76   -0.364829
77   -0.464602
78   -0.164691
79   -1.175154
80   -0.506535
81    0.454582
82    0.280849
83   -0.334494
84   -0.517976
85    0.737222
86   -0.372834
87    0.015650
88   -0.995165
89    2.299816
90    1.060514
91   -0.655665
92    1.643850
93    0.647205
94   -0.039996
95    0.174548
96   -0.980701
97    0.791597
98    0.475732
99    0.433924
Name: my_data, dtype: float64

In [9]:
sns.distplot(ser1, bins=25)


Out[9]:
<matplotlib.axes._subplots.AxesSubplot at 0x11a734210>

In [ ]: