当前位置:网站首页>Successfully resolved TypeError: can't multiply sequence by non-int of type 'float'
Successfully resolved TypeError: can't multiply sequence by non-int of type 'float'
2022-08-11 00:58:00 【A Virgo programmer】
Successfully resolved TypeError: can't multiply sequence by non-int of type 'float'
Table of Contents
Fix the problem
TypeError: can't multiply sequence by non-int of type 'float'
Solutions
TypeError: cannot multiply sequence by non-integer of type 'float'
Workaround
The two data types are inconsistent, and the multiply operation cannot be performed!Recheck the input data type, the background of the problem in this case was encountered during the feature engineering process,
feature: string or list.feature or feature list to investigate,for one-hot encoding features, feature list is required.String or list, feature or list of features to investigate, for one-hot encoded features a list of features is required.
After analysis, it is found that the input data type is object, and the function requires int or float type.
So just change the data variable type!
边栏推荐
- Linux install redis database
- Distributed. Performance optimization
- [Excel knowledge and skills] Convert "false" date to "true" date format
- 【js】获取当前时间的前后n天或前后n个月(时分秒年月日都可)
- How to do patent mining, the key is to find patent points, in fact, it is not too difficult
- 二维数组实战项目--------《扫雷游戏》
- 【视频】报告分享|2021年保险行业数字化洞察
- 数据分析面试手册《SQL篇》
- leetcode 前K个高频单词
- SQL statement--get database table information, table name, column name, description comment, etc.
猜你喜欢
数据分析面试手册《统计篇》
BEVDepth: Acquisition of Reliable Depth for Multi-view 3D Object Detection Paper Notes
地下管廊可视化管理系统搭建
Mysql. Slow Sql
MySQL进阶查询
J9数字论:DAO治理更像一种生态过程:治理原生于网络,不断演变
EN 12467纤维水泥平板产品—CE认证
Two-dimensional array combat project -------- "Minesweeper Game"
[Excel knowledge and skills] Convert "false" date to "true" date format
Shell编程三剑客之sed
随机推荐
编程技巧│selenium 更新 chromedriver 驱动
数据分析面试手册《统计篇》
力扣------使用最小花费爬楼梯
networkmanager无法打开
Jvm. Profiling tools (jconsole, jvisualvm, arthas, jprofiler, mat)
J9数字论:DAO治理更像一种生态过程:治理原生于网络,不断演变
[ASM] The relationship between the role of the bytecode operation ClassWriter COMPUTE_FRAMES and visitMaxs
什么是数组
word 设置标题前分页
【ASM】字节码操作 ClassWriter COMPUTE_FRAMES 的作用 与 visitMaxs 的关系
循环单词
YOLOv5的Tricks | 【Trick11】在线模型训练可视化工具wandb(Weights & Biases)
如何做到构建的提速,再提速
【openpyxl】过滤和排序
Pico 4更多参数曝光:Pancake+彩色透视,还有Pro版本
C# using timer
Sub-database sub-table ShardingSphere-JDBC notes arrangement
MSTP——多生成树(案列+配置)
nodejs项目连接mysql数据库
SAP ABAP JSON 格式数据处理