解决方法:在idxmax()前加.astype(‘float64’)

.argmin() .argmax() 计算最大、小值所在位置的索引(针对自动索引的)(适用于Series类型:)

.idxmin() .idxmax() 计算最大、小值所在位置的索引(针对自定义索引的)(适用于Series类型:)

这几个函数都是适用的 不过 最好先把数据类型都打印出来

print(results_table.dtypes)

结果:

C_parameter float64

Mean recall score

object dtype: object 所以要把object类型转换为float64。用astype(flost64)完成 就像这样,然后就不报错了。

TypeError: reduction operation 'argmin' not allowed for this dtype的更多相关文章

  1. TypeError: reduction operation 'argmax' not allowed for this dtype

    这个错误真的tmd伤脑筋.我用idxmax函数去求series类型的最大值的索引,结果明明是下面这种数据, 无论我如何pint他的shape,type,他怎么看都是一个满足idxmax函数要求的参数类 ...

  2. 破解LR时,解决loadrunner 破解错误:license security violation.Operation is not allowed

    一.由于在压力测试执行中,出现一个-10803的错误 ,为解决这个错误,重新设置的环境变量,在次执行错误,这个问题解决了,但另外一个问题出来了,LR,打开脚本编辑器老提示找不到TEMP目录,当时没有想 ...

  3. ValueError: output parameter for reduction operation logical_and has too many dimensions ?

    https://docs.scipy.org/doc/numpy-dev/reference/generated/numpy.all.html#numpy.all 运行示例,却发生错误 import ...

  4. loadrunner破解出现“license security violation,Operation is not allowed”的错误提示

    1.关闭loadrunner,将破解文件(“lm70.dll”.“mlr5lprg.dll”)放置在LoadRunner\bin下面 2.以管理员身份运行loadrunner,在CONFUGURATI ...

  5. ValueError: zero-size array to reduction operation maximum which has no identity

    数据打印到第530行之后出现以下异常,求解!

  6. loadrunner11破解失败,已解决“ license security violation.Operation is not allowed ”问题

    参考链接https://blog.csdn.net/yongrong/article/details/7891738,亲测可以解决问题 在64位win7系统中安装LR11时,采用普通的方法无法授权.最 ...

  7. Reduction operations

    Reuction operations Reduction operations A reduction operations on a tensor is an operation that red ...

  8. [源码解析] 深度学习分布式训练框架 horovod (7) --- DistributedOptimizer

    [源码解析] 深度学习分布式训练框架 horovod (7) --- DistributedOptimizer 目录 [源码解析] 深度学习分布式训练框架 horovod (7) --- Distri ...

  9. Sort with Swap(0, i)

    原题连接:https://pta.patest.cn/pta/test/16/exam/4/question/678 题目如下: Given any permutation of the number ...

随机推荐

  1. ansible组

    安装公钥:服务器互通需要公钥和秘钥 https://www.cnblogs.com/yaozhiqiang/p/9951606.html 配置完成pulic ssh key(公钥和秘钥)之后 进入/e ...

  2. Ionic -v1初始项目结构

    界面  

  3. element 弹框关闭报错

    <template> <el-container style="padding: 00px 20px 0px 20px"> <el-dialog ti ...

  4. Smarty模板引擎模板文件.tpl和.html的区别

    在WEB开发中,PHP作为业务逻辑,HTML作为表现逻辑.但是在Smarty一些文档中可以看到模板文件的拓展名是.tpl,而不是.html,其实所谓的.tpl就是.html. 模版文件可以用任意的扩展 ...

  5. 基于 SwiftUI 创建一个可删除、可添加列表项的列表

    执行环境 macOS Mojave: 10.14.5 xcode: Version 11.0 beta 6 (11M392q) 预览效果 完整代码 import SwiftUI class Item: ...

  6. linux Sersync 上配置客户端

    1.安装 Rsync 并配置相关权限 在 SERSYNC 上配置 RSYNC 客户端相关权限认证: [root@SERSYNC /]# yum install rsync -y [root@SERSY ...

  7. C# WinForm定时触发事件

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  8. vue-cli安装以及搭建vue项目详细步骤

    vue init webpack projectname(projectname是你项目的名称) 创建项目卡住不动解决方案: https://cli.vuejs.org/zh/guide/instal ...

  9. root登录

    ,编辑/etc/lightdm/lightdm.conf: gedit /etc/lightdm/lightdm.conf [Seat:*] autologin-guest=false autolog ...

  10. Linux学习-基于CentOS7的MariaDB数据库的主从复制

    一.MySQL主从复制原理 主从同步过程中主服务器有一个工作线程I/O dump thread,从服务器有两个工作线程I/O thread和SQL thread: 主服务器: dump Thread: ...