Cannot convert CSV table to points


I have been attempting to convert an x,y,z,scalar dataset to points using the Table to Points filter. However, I cannot get it to work no matter what I do. I am using a pristine installation of 5.8.0 on Windows. I have been working on this problem for 3 days and have exhausted any help that google can provide.

I created the CSV file with Excel. It originally had floating point values but I also tried scaling up the x,y,z values to make them integers. There are 597 rows. I have tried both with and without headers. I once tried using just the first few lines and it worked…once. I cannot figure out what made it work. I have run the file through Notepad to try to remove any invisible or unusual characters. I have tried sorting the data. I tried creating a new, 4x4 file with headers by hand from scratch. The data seems to import fine; it appears in spreadsheet view (though the columns are reordered). I am selecting the Table to Points filter and then selecting which columns represent which dimensions. When I try to apply the filter, I get the following error:

What am I doing wrong?

Thanks in advance!

Welcome to the ParaView community!

Can you post a sample of the file large enough to show the problem?

A thought came to me while I was going to get samples for you and the problem has been solved.

I had to escape the column titles with quotes. This had the effect of putting the columns in alphabetical order in spreadsheet view and the Table to Points worked. I am not sure why nobody has had this problem before.





Under RFC 4180, this is probably a bug. Assuming that VTK is used to read the file: CSV does not have strong data typing and VTK appears to read in data as strings and then use a heuristic to change the data type if it seems appropriate ( I am not sure what it going on with the column names since I cannot see the data types…that alphabetization of the column titles in spreadsheet view seems significant though.

Thanks for your quick reply!

I was hoping for a little more feedback before this got closed. I assume that this is not the intended behavior. How do I submit this as a bug report? Thanks. is the place to report bugs.

I’ve not had the problems you’re seeing. I never have quoted headers in my .csv files and it always works fine unless something is wrong with my data below. But I’m also not using Excel, which I’d like to note does strange and mysterious things to your data’s formatting.

Have you tried filtering it through R or pandas by loading and resaving it out, just to see if that clears any possible Excel formatting?

Is it data you can share?

-David O.

Hi David,

I created test files by hand in Notepad and the behavior reproduces. Check out my bug report (link below), which has sample files and further information. Seems to be a byte-order-mark issue.