橙色的Python数据加载错误:“示例无效长度" [英] Orange Python data load error: "example of invalid length"

查看:119
本文介绍了橙色的Python数据加载错误:“示例无效长度"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用python&加载.csv文件.橙色(机器学习包)并出现错误.我有208列,但在错误中我只看到了几列,之后什么也没有. 错误是什么意思?

I am trying to load a .csv file using python & Orange (machine learning package) and getting an error. I have 208 columns but in the error I only see few columns and after that nothing. What does the error mean?

example of invalid length: (0 REAL P 16 0 1 0 112.11.119.78 Mozilla/5.0 (Linux; U; Android 4.0.3; zh-cn; HTC Sensation Z710e Build/IML74K) AppleWebKit/534.30 (KHTML  like Gecko) Ve android_android23 Droid Smartphone Android 4.0.3 0 1 1 0 0 0 1 Android_Phones Null Null Null Null Null Null Null Null Null Null Null Null Null Null Null wifi Null Null pyramid 0 1 1 26 0 0 0 8 0 7 0 0 0 0 0 0 0 0 0 0 Null Null Null Null en 1 CN Null FALSE ANDROID_APPLICATION ANDROID_APPLICATION

推荐答案

我最近在尝试将大量数据导入Orange时亲自解决了该错误.我的数据的问题在于某些字段信息中包含逗号,并且Orange数据导入器一直认为这些是多余的定界符.尝试同时导入逗号和制表符分隔的数据文件时发生这种情况.

I just recently worked through this error myself when trying to import a bunch of data into Orange. The problem with my data was that there were commas in some of the field information, and the Orange data importer kept thinking these were extra delimiters. This happened when trying to import both comma and tab-separated data files.

我的解决方案是在数据文件进入Orange之前对其进行预处理,并用另一个字符替换所有逗号,这些字符未出现在数据的其余部分中,并且Orange不会将其视为定界符(对我来说, ':'字符很好用).

My solution was to pre-process the data file before it went into Orange, and replace all commas with another character which did not appear in the rest of the data, and would not be considered a delimiter by Orange (for me a ':' character worked out just fine).

我想说的是检查您的数据,并确保没有多余的制表符或逗号可能会被用作多余的分隔符.

I would say check your data and make sure there are no stray tabs or commas that may get picked up as extra delimiters.

此外,您是仅从错误消息中包含的数据,还是一整行数据?

Also, is the data you included just from the error message, or is that a full line of your data?

这篇关于橙色的Python数据加载错误:“示例无效长度"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆