interfaces.utility.csv

CSVReader

Link to code

Examples

>>> reader = CSVReader()  
>>> reader.inputs.in_file = 'noHeader.csv'  
>>> out = reader.run()  
>>> out.outputs.column_0 == ['foo', 'bar', 'baz']  
True
>>> out.outputs.column_1 == ['hello', 'world', 'goodbye']  
True
>>> out.outputs.column_2 == ['300.1', '5', '0.3']  
True
>>> reader = CSVReader()  
>>> reader.inputs.in_file = 'header.csv'  
>>> reader.inputs.header = True  
>>> out = reader.run()  
>>> out.outputs.files == ['foo', 'bar', 'baz']  
True
>>> out.outputs.labels == ['hello', 'world', 'goodbye']  
True
>>> out.outputs.erosion == ['300.1', '5', '0.3']  
True

Inputs:

[Mandatory]
in_file: (an existing file name)
        Input comma-seperated value (CSV) file

[Optional]
header: (a boolean, nipype default value: False)
        True if the first line is a column header

Outputs:

None