TypeError: reduction operation 'argmin' not allowed for this dtype
解决方法:在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的更多相关文章
- TypeError: reduction operation 'argmax' not allowed for this dtype
这个错误真的tmd伤脑筋.我用idxmax函数去求series类型的最大值的索引,结果明明是下面这种数据, 无论我如何pint他的shape,type,他怎么看都是一个满足idxmax函数要求的参数类 ...
- 破解LR时,解决loadrunner 破解错误:license security violation.Operation is not allowed
一.由于在压力测试执行中,出现一个-10803的错误 ,为解决这个错误,重新设置的环境变量,在次执行错误,这个问题解决了,但另外一个问题出来了,LR,打开脚本编辑器老提示找不到TEMP目录,当时没有想 ...
- 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 ...
- loadrunner破解出现“license security violation,Operation is not allowed”的错误提示
1.关闭loadrunner,将破解文件(“lm70.dll”.“mlr5lprg.dll”)放置在LoadRunner\bin下面 2.以管理员身份运行loadrunner,在CONFUGURATI ...
- ValueError: zero-size array to reduction operation maximum which has no identity
数据打印到第530行之后出现以下异常,求解!
- loadrunner11破解失败,已解决“ license security violation.Operation is not allowed ”问题
参考链接https://blog.csdn.net/yongrong/article/details/7891738,亲测可以解决问题 在64位win7系统中安装LR11时,采用普通的方法无法授权.最 ...
- Reduction operations
Reuction operations Reduction operations A reduction operations on a tensor is an operation that red ...
- [源码解析] 深度学习分布式训练框架 horovod (7) --- DistributedOptimizer
[源码解析] 深度学习分布式训练框架 horovod (7) --- DistributedOptimizer 目录 [源码解析] 深度学习分布式训练框架 horovod (7) --- Distri ...
- Sort with Swap(0, i)
原题连接:https://pta.patest.cn/pta/test/16/exam/4/question/678 题目如下: Given any permutation of the number ...
随机推荐
- JavaScript高级笔记
# 今日内容: 1. JavaScript: 1. ECMAScript: 2. BOM: 3. DOM: 1. 事件 ...
- Rsync+sersync部署
内核版本:2.6.32-431.el6.x86_64 系统采用最小化安装,系统经过了基本优化,selinux 为关闭状态,iptables 为无限制模式 源码包存放位置:/root Rsync 客户端 ...
- C# Windows Services 启动和结束其它进程
将exe所在的绝对路径和进程名配置到配置文件中 <add key="FilePath" value="D:\ABC\ABCD.Console.exe"/& ...
- 十大热门AI芯片
资料来源:头条<人工智能影响力报告>中的人工智能十大热门芯片 iPhone X内部搭载了一颗全新定制的处理器——A11 Boinic,用来承担人脸识别和移动支付的工作负荷.双核心A11芯片 ...
- 二、搭建Swagger
1.新建.netCore webapi项目 2.安装swagger ,通过 Package Manager 控制台:Install-Package Swashbuckle.AspNetCore 3.修 ...
- BZOJ 3729 GTY的游戏
伪ETT? 貌似就是Splay维护dfn = = 我们首先观察这个博弈 这个博弈直接%(l+1)应该还是很显然的 因为先手怎么操作后手一定能保证操作总数取到(l+1) 于是就变成阶梯Nim了 因为对于 ...
- Java类加载器初识
类加载器基本概念 类加载器(class loader)用来加载 Java 类到 Java 虚拟机中.一般来说,Java虚拟机使用Java类的方式如下:Java 源程序(.java 文件)在经过 Jav ...
- 【leetcode】1041. Robot Bounded In Circle
题目如下: On an infinite plane, a robot initially stands at (0, 0) and faces north. The robot can recei ...
- 对webpack的初步研究1
一.概念: 1.webpack的核心是用于现代JavaScript应用程序的静态模块捆绑器.当webpack处理您的应用程序时,它会在内部构建一个依赖关系图,它映射您的项目所需的每个模块并生成一个或多 ...
- leetcode_1293. Shortest Path in a Grid with Obstacles Elimination_[dp动态规划]
题目链接 Given a m * n grid, where each cell is either 0 (empty) or 1 (obstacle). In one step, you can m ...