当前位置:网站首页>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
边栏推荐
猜你喜欢
![[explanation] get ora-12838: cannot read / modify an object after modifying it in parallel](/img/7c/0adc0940b6d5c8a61d34bfa5f66ee7.png)
[explanation] get ora-12838: cannot read / modify an object after modifying it in parallel

Talk about the basic but not simple stock data

mysql查询字符串类型的字段使用数字类型查询时问题

WordPress love navigation theme 1.1.3 simple atmosphere website navigation source code website navigation source code

谈谈那些基础但不简单的股票数据

396. Rotate Function

怎么读书读论文

The simple problem of leetcode is to calculate the numerical sum of strings

一款拥有漂亮外表的Typecho简洁主题_Scarfskin 源码下载

396. Rotate Function
随机推荐
一键清理项目下pycharm和Jupyter缓存文件
Ansible Automation Operation and Maintenance details (ⅰ) Installation and Deployment, Parameter use, list Management, Profile Parameters and user level ansible operating environment Construction
[learning] audio and video development from scratch (9) -- nuplayer
输入/输出系统
C language learning record -- use and analysis of string function (2)
谈谈那些基础但不简单的股票数据
Campus transfer second-hand market source code download
扎心了!一女子发朋友圈羡慕别人按时发工资被开除,连点赞的同事也一同被开除了...
Interesting JS code
clang 如何产生汇编文件
ansible自動化運維詳解(一)ansible的安裝部署、參數使用、清單管理、配置文件參數及用戶級ansible操作環境構建
JS中复制数组
mysql查询字符串类型的字段使用数字类型查询时问题
Talk about the basic but not simple stock data
Rotation function of leetcode medium problem
关于ORB——SLAM运行中关键帧位置越来越近的异常说明
Shell脚本进阶
redis主从服务器问题
WordPress love navigation theme 1.1.3 simple atmosphere website navigation source code website navigation source code
QT reading and writing XML files