解决方法:在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. wepy_two

    2.代码高亮WebStorm/PhpStorm(其他工具参见:wepy官网代码高亮) (1)打开Settings,搜索Plugins,搜索Vue.js插件并安装. (2) 打开Settings,搜索F ...

  2. Android Studio使用阿里云Aliyun Maven仓库

    如下所示,在build.gradle中添加Aliyun Maven仓库 // Top-level build file where you can add configuration options ...

  3. css 伪类选择器:checked实例讲解

    css :checked伪类选择器介绍 css :checked伪类选择器用于选择匹配所有被选中的单选按钮(radio)或复选框(checkbox),你可以结合:checked伪类选择器和:not选择 ...

  4. luogu4061 大吉大利,晚上吃鸡!

    链接 最短路径\(dag\),一道好题. 题目大意:求一张图中满足下列要求的点对\((i,j)\)数量: 所有最短路径必定会经过 \(i\) 点和 \(j\) 点中的任意一点. 不存在一条最短路同时经 ...

  5. springboot+thymeleaf 访问静态资源解决(static)

    ---------------------------------------2.1.3-------------------------------------------------------- ...

  6. 1349 - View's SELECT contains a subquery in the FROM clause

    mysql创建视图 报错1349 - View's SELECT contains a subquery in the FROM clause:: 原因创建视图的sql语句中有不支持子查询, 所以需要 ...

  7. OC + RAC (八) 查看信号状态和跳过信号

    -(void)_test9{ /// RACCommand又叫命令 是用来收发数据的 监听按钮点击,网络请求.... RACCommand * command = [[RACCommand alloc ...

  8. MS4W安装教程

    简介 欢迎使用MS4W,这是由Gateway Geomatics开发的快速简便的安装程序,用于为Windows及其附带应用程序(如Geomoose.MapBender.Openlayers等)设置Ma ...

  9. 使用PHPExcel操作Excel用法实例分析

    本文实例分析了使用PHPExcel操作Excel用法.分享给大家供大家参考.具体分析如下: PHPExcel下载地址:http://www.codeplex.com/PHPExcel http://w ...

  10. C/C++ | 并查集:用于检查一个图上有没有环

     没有环的过程分析: #include<stdio.h> #include<stdlib.h> #include<iostream> #define VERTICE ...