当前位置:网站首页>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 11:42:00 【懒笑翻】
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(

解释:FutureWarning:索引多个键(隐式转换为键的元组)将被弃用,使用列表代替。
最初代码:
temp_data = data[data['Sex'] == 'F'].groupby(['Sport'])['Age', 'Height', 'Weight'].mean().reset_index().dropna(
how='any')解决:
temp_data = data[data['Sex'] == 'F'].groupby(['Sport'])[['Age', 'Height', 'Weight']].mean().reset_index().dropna(
how='any')解决思路:
把
['Age', 'Height', 'Weight']
改成
[['Age', 'Height', 'Weight']]
此警告在 pandas 1.0.0中引入。groupby方法后使用双括号,单括号用于输出Pandas系列,双括号用于输出Pandas DataFrame。
边栏推荐
- PHP ⽉ the simplest way to add and subtract ⽅
- 用C语言开发NES游戏(CC65)07、控制器
- Uniapp wechat applet realizes the function of connecting low-power Bluetooth printing
- 用arduino开发ESP8266 搭建开发环境
- SQL injection less23 (filter comment)
- 金九银十 再不卷就来不及了
- Tencent two sides: @bean and @component are used in the same class, what will happen?
- Developing NES games with C language (cc65) 06. Sprites
- 用C语言开发NES游戏(CC65)03、VRAM缓冲区
- 一台电脑上 多个项目公用一个 公私钥对拉取gerrit服务器代码
猜你喜欢

Analysys analysis: focus on users, improve the user experience of mobile banking, and help the growth of user value

Use json.stringify() to format data

设计一个线程池

Developing NES games with C language (cc65) 08. Background collision

Markdown concise grammar manual

Configure jupyter remote server

图书馆自动预约脚本

Laravel form data validation

New Oriental's single quarter revenue was 524million US dollars, a year-on-year decrease of 56.8%, and 925 learning centers were reduced

Arduino Pro Mini atmega328p connect and light the first LED (at the same time, record the problem of burning failure stk500_recv)
随机推荐
PHP ⽉ the simplest way to add and subtract ⽅
Analysis of new retail e-commerce o2o model
Sub database and sub table may not be suitable for your system. Let's talk about how to choose sub database and sub table and newsql
Holes in [apue] files
用C语言开发NES游戏(CC65)04、完整的背景
Marketing play is changeable, and understanding the rules is the key!
[dark horse morning post] LETV 400 employees have no 996 and no internal papers; Witness history! 1 euro =1 US dollar; Stop immediately when these two interfaces appear on wechat; The crackdown on cou
用C语言开发NES游戏(CC65)08、背景 碰撞
恋爱男女十禁
Developing NES games with C language (cc65) 02. What is v-blank?
Uniapp wechat applet realizes the function of connecting low-power Bluetooth printing
[try to hack] UDF raises rights
Not optimistic about Apple making AR, Luo Yonghao: I'll do it myself
Developing NES games with C language (cc65) 04. Complete background
Open source huizhichuang future | 2022 open atom global open source summit openatom openeuler sub forum was successfully held
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
揭秘界面控件DevExpress WinForms为何弃用受关注的MaskBox属性
PHP date calculation operation processing, the current date plus one day and the specified date minus one day
Developing NES game (cc65) 07 and controller with C language
用C语言开发NES游戏(CC65)06、精灵