当前位置:网站首页>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.
边栏推荐
- Review the IO stream again, and have an in-depth understanding of serialization and deserialization
- Under what circumstances can the company dismiss employees
- [base] what is the optimization of optimization performance?
- C语言项目中使用json
- Fundamentals of machine learning - support vector machine svm-17
- 连通块&&食物链——(并查集小结)
- sqli-labs(less-8)
- Which big model is better? Openbmb releases bmlist to give you the answer!
- Solution to the binary tree problem of niuke.com
- leetcode 376. Wiggle Subsequence
猜你喜欢

Which big model is better? Openbmb releases bmlist to give you the answer!

What SaaS architecture design does a software architect need to know?

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

Design a thread pool

GMT安装与使用

Vs code is not in its original position after being updated

Fundamentals of machine learning - support vector machine svm-17

New progress in the implementation of the industry | the openatom openharmony sub forum of the 2022 open atom global open source summit was successfully held

云原生—运行时环境

leetcode 1518. 换酒问题
随机推荐
C for循环内定义int i变量出现的重定义问题
VS1003 debugging routine
Marketing play is changeable, and understanding the rules is the key!
MSP430 开发中遇到的坑(待续)
Holes in [apue] files
Markdown concise grammar manual
HC-05蓝牙模块调试从模式和主模式经历
stm32 回环结构接收串口数据并处理
Insufficient permission to pull server code through Jenkins and other precautions
Library automatic reservation script
Deployment之滚动更新策略。
FutureWarning: Indexing with multiple keys (implicitly converted to a tuple of keys) will be depreca
SuperMap game engine license module division
Custom paging tag 02 of JSP custom tag
揭秘界面控件DevExpress WinForms为何弃用受关注的MaskBox属性
Leetcode 1518. wine change
C语言项目中使用json
leetcode 1518. 换酒问题
[nuxt 3] (XII) project directory structure 3
1331. 数组序号转换 : 简单模拟题