I was trying to calculate std
for an array, i've tried to use numpy
and pandas
in order to find std
, but what i achieved is not logical, i have two different std
's for the same array !
Why does this happens ?
>>> import numpy as np
>>> import pandas as pd
>>> a = np.arange(10)+1
>>> a
array([ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
>>> a.std()
2.8722813232690143
>>> b = pd.DataFrame(a)
>>> b.std()
0 3.02765
dtype: float64