Table 15.1 shows what JMP data types can be exchanged with Python using the Python Send() function. Sending lists or associative arrays to Python recursively examines each element of the list or associative array and sends each base JMP data type. Nested lists and associative arrays are supported.
JSL Data Type |
Python Data Type |
---|---|
Boolean |
Boolean |
Data Table |
jmp.DataTable() Object |
Associative Array |
Dictionary |
Numeric |
Float |
Matrix |
numpy.ndarray() Object |
List |
List |
String |
Unicode String |
Note: The Python package NumPy is required to use the Python Send() and Python Get() functions with the JSL Matrix data type. See Install Python Packages using JSL.
Names Default To Here( 1 );
x = {1, 2, 3};
Python Send( x );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Python Send( dt );
Python Submit( "print(x)" );
Python Submit( "print(dt)" );