当前位置:网站首页>Failed to convert a NumPy array to a Tensor(Unsupported Object type int)
Failed to convert a NumPy array to a Tensor(Unsupported Object type int)
2022-04-23 08:24:00 【Different quadratic element】
Error is as follows , Description of... Model is not supported Object type ( Non numeric type ) The data of , So I need to say Object The data of this type is coded by single heat , Or precoding yourself , The code is as follows :
import pandas as pd
data=pd.read_csv("test.csv")
for features in data.columns:
if data[features].dtype == 'object':
data[features] = pd.Categorical(data[features]).codes
版权声明
本文为[Different quadratic element]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230742105395.html
边栏推荐
- Ansible Automation Operation and Maintenance details (ⅰ) Installation and Deployment, Parameter use, list Management, Profile Parameters and user level ansible operating environment Construction
- LeetCode簡單題之計算字符串的數字和
- 使用JWT生成与解析Token
- Generate and parse tokens using JWT
- 5.6 comprehensive case - RTU-
- Qtablewidget header customization and beautification developed by pyqt5 (with source code download)
- 作文以记之 ~ 二叉树的后序遍历
- colorui 解决底部导航遮挡内容问题
- js常用数组方法
- vslam PPT
猜你喜欢
LeetCode简单题之三除数
Search the complete navigation program source code
QT compilation qtxlsx Library
一款拥有漂亮外表的Typecho简洁主题_Scarfskin 源码下载
Weekly leetcode - 06 array topics 7 ~ 739 ~ 50 ~ offer 62 ~ 26 ~ 189 ~ 9
关于ORB——SLAM运行中关键帧位置越来越近的异常说明
Using qlst excel file
Listed on the Shenzhen Stock Exchange: the market value is 5.2 billion yuan. Lu is the East and his daughter is American
利用Js实现一个千分位
PyQt5开发之QTableWidget表头自定义与美化(附源代码下载)
随机推荐
英语课小记(四)
SYS_CONNECT_BY_PATH(column,'char') 结合 start with ... connect by prior
My heart's broken! A woman's circle of friends envied others for paying wages on time and was fired. Even her colleagues who liked her were fired together
作文以记之 ~ 二叉树的后序遍历
单点登录 SSO
Multi vision slam
js将树形结构数据转为一维数组数据
The annotation is self-defined by implementing the parameter parser handlermethodargumentresolver interface
如何保护开源项目免遭供应链攻击-安全设计(1)
[appium] encountered the problem of switching the H5 page embedded in the mobile phone during the test
Compiling principle questions - with answers
form表单 post提交 数据量大的问题
There are some problems when using numeric type to query string type fields in MySQL
Data deletion and modification (MySQL)
CGM optimizes blood glucose monitoring and management -- Yiyu technology appears in Sichuan International Medical Exchange Promotion Association
DOM学习笔记---遍历页面所有元素节点
利用Js实现一个千分位
Situational leaders - Chapter 7, solving performance problems
jsp页面编码
耳穴减肥自身感受细节描述0422