cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
EoinRegan
Level I

Python Integration

Hey Everyone,

I’m new to JMP but have a lot of experience in Python.
I’m using JMP as a validated platform for statistical analysis and want to use python to allow easy csv writing etc.
I’m really struggling with bringing variables into and out of jsl.

I have a JMP data table that I want to do simple analysis on (min,mean max, std, etc) which I have used python to find. I am trying to find a way to use jsl to calculate tolerance interval, process capability and a few other things.

My question comes down to this, how can I go about doing these analyses and then sending those results to an indexable python format.
All of my attempts following the scripting guide on JMP have resulted in errors that I cannot find a fix for. (Different almost every time)
I understand this may be my stubbornness for using python but I need to save the results to a csv and I find python indexing and formatting a lot easier. (The lack of consistent errors to try to fix are not helping)

TLDR how do I pull results from a JSL script for later use in python

I’ve tried to use the scripting guide to find
4 REPLIES 4
jthi
Super User

Re: Python Integration

JMP can save to .csv (or text file). What have you used for your sources about the Python Integration? Which version of JMP are you using?

-Jarmo
txnelson
Super User

Re: Python Integration

My first question is, what version of JMP are you using?  JMP 19 provides improved utilities to access JMP from Python.

Also, under JMP there are extensive Help pages on the integration of JMP to Python and Python to JMP.

Jim
lala
Level IX

Re: Python Integration

It's very simple. You just need to ask gemini3.1 pro questions. It's sure to solve most of the problems.

Don't use ChatGPT.

Re: Python Integration

If you are using JMP 18 or newer, look in the scripting index 'Python' category.  There are many samples there.  Specifically look a the jmp.DataTable object.  It behaves as a Python list of columns, and each column behaves as a list of rows.  The data table object itself is iterable and is direct in memory access to the data table.

See: Python Send(); and Python Get(); JSL functions ( read / write ) JSL variables to/from python.

In JMP 19 and beyond see jmp.globals and jmp.here dictionaries for accessing JSL global and here namespace variables from Python (read/write) 

You don't need to go back and forth through CSV, but JSL can read/write CSV, and pandas in Python can directly read and write CSV if that's truly what you want.

Remember the jmp.DataTable access in Python is 0-based indexing while JSL operates on 1-based indexing.

 

Recommended Articles