The OP may be referring more to slicing (tutorial here):
https://www.pythoncentral.io/how-to-slice-listsarrays-and-tuples-in-python/
@agweb.salinas: In your current code, ‘table’ in line 11 is not defined. That’s where your error is happening.
The file you posted has a Byte Order Marker (BOM) at the beginning of the file. I don’t know if that’s intentional, or just an artifact of making a csv file in Excel or whatever you used to make it. If it normally doesn’t, then don’t worry about it, But to make the results consistent, the file should be opened using the codecs library.
import csv, codecs
#path = 'C:\\Test\\Dispatch Dummy.csv'
path = system.file.openFile("csv")
if path != None:
csvData = csv.reader(codecs.open(path, encoding='utf-8-sig'))
header = [h.capitalize() for h in csvData.next()]
datasetData = []
for row in csvData:
if row[-1] == '3':
datasetData.append(row)
dataOut = system.dataset.toDataSet(header, datasetData)
event.source.parent.getComponent('Table').data = dataOut