如何计算列表中每个系列的标准差和均值

时间:2018-07-25 02:54:08

标签: python list pandas

enter image description here

如何在上面显示的列表中计算每个系列的标准差和均值。

1 个答案:

答案 0 :(得分:0)

Pandas已为Series内置了static_filemean方法:

std

输出:

[(x.mean(), x.std()) for x in data]

数据:

[(0.49934333895737004, 0.27461607837320307),
 (0.48249584271287005, 0.29392453866333784),
 (0.5253031047833215, 0.2915732660895214),
 (0.502227202304306, 0.2800155771737585),
 (0.45248717136739863, 0.3065349918155113),
 (0.524076962361421, 0.30774118943725953),
 (0.49854839726526873, 0.2903590219165625)]