,比如我有一個熊貓據幀,它看起來如下:爲DF標準差,熊貓
a b c
1 2 3
4 5 6
7 8 9
我要計算這個DF所有值的標準差。函數df.std()
讓我回到pro專欄的值。
當然,我可以創造下一個代碼:
sd = []
sd.append(list(df['a']))
sd.append(list(df['b']))
sd.append(list(df['c']))
numpy.std(sd)
是否有可能做到這一點的代碼更簡單,使用一些功能大熊貓這個DF?
[Pandas:整個數據幀計算平均值或標準差(標準偏差)]的可能重複項(http://stackoverflow.com/questions/25140998/pandas-compute-mean-or-std-standard-deviation-over-整個數據幀) –