Import/export data from csv with custom separator

This post I made a while ago may help you. Here is the code contained in the Python node:

import sys
sys.path.append('C:\Program Files (x86)\IronPython 2.7\Lib')
import csv
import StringIO

csv_in = IN[0]
output = []

source = StringIO.StringIO(csv_in)
csv_out = csv.reader(source, dialect=csv.excel)

OUT = [line for line in csv_out]
1 Like