问题
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
回答1:
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.
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?
来源:https://stackoverflow.com/questions/15973580/orange-python-data-load-error-example-of-invalid-length