Change default delimiter for csv files

Hello there,

I want to use 3DSlicer to plot data from csv files that use semicolons as delimiter. However, it seems that this is not possible. I cannot use a comma as a delimiter for certain reasons.

Is there really no way to use csv files with delimiters other than comma?

Thank you very much in advance!

Elle

You can rename the file to have .tsv extension (tab-separated-value) and then use tab character as separator. If you can really just use semicolon then you can load it with a 4-5 lines of Python (load the file with pandas into a numpy array and set the array in a table node using slicer.util.updateTableFromArray).

Hey Andras,
Thank you very much for your quick reply. Indeed, I can only use semicolon as delimiter. Unfortunately, I have almost no experience with coding. Could you please elaborate further?

Thank you very much in advance!

We could make the delimiter configurable, as long there is a strong use case for it (there is no reasonable alternative and/or many people would find it useful). Can you tell us why you must use semicolon? What generates the file? How are you going to use the table in Slicer?

I am using 3Dslicer to plot data points (from csv files) in order to inspect whether their positioning is correct. These csv files also contain descriptions (text with quotes etc.), which belong to the data points and are therefore necessary. The plotting in 3D slicer is just a method of inspection, the csv files will be used for further purposes.