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 ...
随机推荐
- 2019-8-14-win10-使用-SMB-v1
title author date CreateTime categories win10 使用 SMB v1 lindexi 2019-08-14 08:55:55 +0800 2018-2-13 ...
- Sql 使用游标
DECLARE data_cursor CURSOR FOR WITH T0 AS ( SELECT COUNT(f.DeptID) SubmitCount , f.DeptID FROM biz.F ...
- RAS
Reliability 高可靠性 Availability 高可用性 Serviceability 高服务性
- 三、MyBatis-全局配置文件
XML 映射配置文件(官方结构) MyBatis 的配置文件包含了会深深影响 MyBatis 行为的设置(settings)和属性(properties)信息.文档的顶层结构如下: configura ...
- Java 逻辑运算符相关解析
问:定简单说说 Java 中 & 与 && 有什么区别?| 与 || 呢? 答:& 是位运算符,&& 是布尔逻辑运算符,| 与 || 类似同理.在进行逻 ...
- Python之批量读取文件【面试必学】
python的os模块可以实现普遍的操作系统功能,并且和平台无关.以下为实现根目录下文件的批量读取. os.listdir(dirname)可以列出dirname下的目录和文件,依次读取相应的文件即可 ...
- 【HbuilerX-Bug】终端无法显示打印信息,也无法输入
经过调试HbuilderX“终端”插件,最终定位问题,问题是插件在打开终端时,无法定位具体的窗口程序,如“cmd.exe”.“powershell.exe”等.可能产生原因:1.可能是电脑系统升级产生 ...
- Beats:如何创建一个定制的Elastic Beat
Beats作为Elastic Stack家族中重要的部分.它可以和方便地让我们把我们的数据发送到Elasticsearch或Logstash之中.如果我们想要生成自己的Beat,请使用GitHub的b ...
- 用C语言编程乘法口诀表
首先是全部,代码如下: #include<stdio.h> void main() { int i,j; ;i<=;i++) { ;j<=;j++) printf(" ...
- EditText控件常用属性
常用属性 android:id——控件ID android:layout_width——控件宽度 android:layout_height——控件高度 android:text——文本内容 andr ...