8.1.2.28 Column::SetData

It is recommended that you switch to the originpro package. PyOrigin is primarily for users who need to work with Origin version prior to 2021.


Description

Put an array of values to a column object.

Syntax

SetData(data, Offset)

Parameters

data
The 1D array of data to be set into the column.
Offset
Starting row index. Default is zero, the first row. If set to -1 then data is appended to the end of the column.

Return

Returns True on success and False on failure.

Examples

#change all text cell to -1

import PyOrigin

wks = PyOrigin.ActiveLayer()
for col in wks.Columns():
	data = col.GetData()
	ii=0
	for cell in data:
		if str(cell).isalpha():
			data[ii]=-1
		ii+=1
	col.SetData(data)

See Also

Column::GetData