当前位置:网站首页>FutureWarning: Indexing with multiple keys (implicitly converted to a tuple of keys) will be depreca
FutureWarning: Indexing with multiple keys (implicitly converted to a tuple of keys) will be depreca
2022-07-28 12:52:00 【Lazy smile】
FutureWarning: Indexing with multiple keys (implicitly converted to a tuple of keys) will be deprecated, use a list instead.
temp_data = data[data['Sex'] == 'F'].groupby(['Sport'])['Age', 'Height', 'Weight'].mean().reset_index().dropna(

explain :FutureWarning: Index multiple keys ( Tuples implicitly converted to keys ) Will be abandoned , Use a list instead of .
The initial code :
temp_data = data[data['Sex'] == 'F'].groupby(['Sport'])['Age', 'Height', 'Weight'].mean().reset_index().dropna(
how='any')solve :
temp_data = data[data['Sex'] == 'F'].groupby(['Sport'])[['Age', 'Height', 'Weight']].mean().reset_index().dropna(
how='any')Solutions :
hold
['Age', 'Height', 'Weight']
Change to
[['Age', 'Height', 'Weight']]
This warning is on pandas 1.0.0 Introduction in .groupby Method is followed by double brackets , Single brackets are used to output Pandas series , Double brackets are used for output Pandas DataFrame.
边栏推荐
- Initialization examples of several modes of mma8452q
- 软件架构师必需要了解的 saas 架构设计?
- Distributed session solution
- Merge table rows - three levels of for loop traversal data
- Custom paging tag 02 of JSP custom tag
- How to realize more multimedia functions through the ffmpeg library and NaPi mechanism integrated in openharmony system?
- STM32F103 several special pins are used as ordinary io. Precautions and data loss of backup register 1,2
- Leetcode remove element & move zero
- 上位机和三菱FN2x通信实例
- LeetCode394 字符串解码
猜你喜欢

界面控件Telerik UI for WPF - 如何使用RadSpreadsheet记录或评论

Sliding Window

Cloud native - runtime environment

FlexPro软件:生产、研究和开发中的测量数据分析

奥浦迈生物通过注册:半年营收1.47亿 国寿成达与达晨是股东

一台电脑上 多个项目公用一个 公私钥对拉取gerrit服务器代码

Hongjiu fruit passed the hearing: five month operating profit of 900million Ali and China agricultural reclamation are shareholders

Leetcode 42. rainwater connection

图书馆自动预约脚本

sqli-labs(less-8)
随机推荐
[half understood] zero value copy
大模型哪家强?OpenBMB发布BMList给你答案!
Uniapp 应用开机自启插件 Ba-Autoboot
C语言项目中使用json
scala 转换、过滤、分组、排序
VS1003调试例程
01 pyechars 特性、版本、安装介绍
Marketing play is changeable, and understanding the rules is the key!
一台电脑上 多个项目公用一个 公私钥对拉取gerrit服务器代码
FutureWarning: Indexing with multiple keys (implicitly converted to a tuple of keys) will be depreca
Leetcode206 reverse linked list
MSP430 开发中遇到的坑(待续)
图书馆自动预约脚本
[cute new problem solving] climb stairs
区块反转(暑假每日一题 7)
Unity loads GLB model
CCF201912-2 回收站选址
Sliding Window
Under what circumstances can the company dismiss employees
leetcode 1518. 换酒问题