torcharrow.DataFrame.mean¶
- DataFrame.mean()¶
返回每列非空值的平均值。
示例
>>> import torcharrow as ta >>> df = ta.dataframe({"a": [1.0,2.0,None,6.3], "b": [5.0, 6.0, None, 10.6] }) >>> df.mean() index a b ------- --- --- 0 3.1 7.2 dtype: Struct([Field('a', Float32(nullable=True)), Field('b', Float32(nullable=True))]), count: 1, null_count: 0