当前位置:网站首页>成功解决TypeError: can‘t multiply sequence by non-int of type ‘float‘
成功解决TypeError: can‘t multiply sequence by non-int of type ‘float‘
2022-08-11 00:33:00 【一个处女座的程序猿】
成功解决TypeError: can't multiply sequence by non-int of type 'float'
目录
解决问题
TypeError: can't multiply sequence by non-int of type 'float'
解决思路
类型错误:不能将sequence乘以“float”类型的非整数
解决方法
两个数据类型不一致,不能够进行multiply运算!重新检查输入数据类型,本案例问题的背景是在特征工程过程中遇到的,
feature: string or list.feature or feature list to investigate,for one-hot encoding features, feature list is required.字符串或列表,要调查的特征或特征列表,对于one-hot编码特征,需要特征列表。
经过分析,发现输入的数据类型为object,而函数要求int或者float类型。
故更改数据变量类型即可!
边栏推荐
- Jvm.分析工具(jconsole,jvisualvm,arthas,jprofiler,mat)
- 15. Interceptor - HandlerInterceptor
- 嵌入式软件打log的一些心得
- HW-常见攻击方式和漏洞原理(2)
- 异常和异常处理机制
- Why do programming languages have the concept of variable types?
- “蔚来杯“2022牛客暑期多校训练营2 DGHJKL题解
- [21-day learning challenge - kernel notes] (5) - devmem read and write register debugging
- 时间戳转换为日期格式、获取当前时间戳
- [Excel knowledge and skills] Convert numeric format numbers to text format
猜你喜欢

【C语言】探索数据的存储(整形篇)
![[Excel knowledge and skills] Convert](/img/96/ece9c3885fd4abe4bf4d211813b9c4.png)
[Excel knowledge and skills] Convert "false" date to "true" date format
![[Excel knowledge and skills] Convert numeric format numbers to text format](/img/fb/79d6928456f090d47f0fe7a5074979.png)
[Excel knowledge and skills] Convert numeric format numbers to text format

地下管廊可视化管理系统搭建

SAS data processing technology (1)

嵌入式软件打log的一些心得

力扣------值相等的最小索引

15. Interceptor - HandlerInterceptor

PMP每日一练 | 考试不迷路-8.10(包含敏捷+多选)

① 数据库介绍 及 关系型数据库的关系代数表达式
随机推荐
Mysql数据库安装配置详细教程
How to do patent mining, the key is to find patent points, in fact, it is not too difficult
BEVDepth: Acquisition of Reliable Depth for Multi-view 3D Object Detection Paper Notes
Pico 4更多参数曝光:Pancake+彩色透视,还有Pro版本
Call activity of Activiti7 sub-process
In 22 years, the salary of programmers nationwide in January was released, only to know that there are so many with annual salary of more than 400,000?
[Excel knowledge and skills] Convert text numbers to numeric format
2022.8.10-----leetcode.640
Apache Commons Configuration远程代码执行漏洞(CVE-2022-33980)分析&复现
Software Testing Certificate (1) - Software Evaluator
使用 BeanUtils 做属性拷贝,性能有点拉胯!
工程师如何对待开源
networkmanager无法打开
[数据可视化] 图表设计原则
分库分表ShardingSphere-JDBC笔记整理
力扣------使用最小花费爬楼梯
LENS CRA和SENSOR CRA匹配问题解析
"NIO Cup" 2022 Nioke Summer Multi-School Training Camp 2 DGHJKL Problem Solution
[21天学习挑战赛——内核笔记](五)——devmem读写寄存器调试
给肯德基打工的调料商,年赚两亿