我正在尝试使用groupby计算不同列的平均值。Here is my code.
然而,当我试图计算平均值时,错误'no numeric types to aggregate'出现了。我的代码出了什么问题?请帮帮我!非常感谢。
发布于 2021-05-18 17:47:28
你能把你的代码作为文本和一些示例数据发布吗?data['low_stress']和data['high_stress']的内容是什么
我的猜测是,您使用pd.Series([low_stress]),从而实例化一系列数据数组。使用pd.Series(low_stress)可能会解决您的问题。
https://stackoverflow.com/questions/67583271
复制相似问题