For the latest version of JMP Help, visit JMP.com/help.


Scripting Guide > Python > Working with JMP Data Tables > Column-Row Orientation in the jmp Package
Publication date: 07/24/2024

Column-Row Orientation in the jmp Package

Because JMP is column-oriented, the first element of a data table object specifies a column. The second element specifies a row, returning the value of the cell at that column and row location.

Columns can be specified using the column name or with indexing.

The following example updates a specific cell of a JMP data table by referencing the column name and indexing to specify a row of that column.

import jmp
 
dt = jmp.open(jmp.SAMPLE_DATA + 'Big Class.jmp')
 
dt['name'][2] = 'JEAN'

The data from the "name" column’s third row, the string JANE, is updated to the string JEAN.

Cells and the JMP Column object

Cells can be modified using the jmp.DataTable.Column object as well. The following code updates a cell in the Big Class.jmp column 'height' from 60 to 62.

import jmp
 
dt = jmp.open(jmp.SAMPLE_DATA + 'Big Class.jmp')
heightCol = dt[3]
heightCol[5] = 62
Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).