Why is pandas.Series.std() different from numpy.std()?
I see. Pandas is using Bessel's correction by default -- that is, the standard deviation formula with N-1
instead of N
in the denominator. As behzad.nouri has pointed out in the comments,
pd.Series([7,20,22,22]).std(ddof=0)==np.std([7,20,22,22])