Rename the column of a dataset

Depends on where the dataset is coming from. The easiest way is to change it at the source.

If you really want to do this in script then you would have to rebuild the Dataset

ds = *Your Data*
headers = system.dataset.getColumnHeaders()
headers[3] = "New Column Name"
values = [[ds.getValueAt(row,col) for col in range(ds.columnCount)] for row in range(ds.rowCount)]
ds = system.dataset.toDataSet(headers,values)
1 Like