dataframe对某列求平均
时间: 2023-11-18 22:54:08 浏览: 86
pandas学习-第1章 pandas基础
要对DataFrame的某一列求平均值,可以使用mean()函数。首先,你需要使用引用中的代码生成一个随机的DataFrame对象df。然后,使用df.mean()即可得到该DataFrame对象中每一列的平均值。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [DataFrame求某列数据的均值,方差等统计数](https://blog.csdn.net/qq_53817374/article/details/123387027)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [Python中如何查看Pandas DataFrame对象列的最大值、最小值、平均值、标准差、中位数等](https://download.csdn.net/download/weixin_38677808/13750214)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [pandas基于时间序列的固定时间间隔求均值的方法](https://download.csdn.net/download/weixin_38623919/14001231)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文