cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Getting started with Python integration in JMP® 18

JMP 18 has a new way to integrate with Python, providing an independent Python environment designed to be used with JMP. In addition, JMP now has a native Python editor and Python packages specific to JMP. This Python environment in JMP has enhanced connectivity and interaction with JMP, which means using Python with JMP has never been easier.

 

Get familiar with the Python integrated development environment (IDE) in JMP 18 and learn how to

  • Locate the Python IDE.
  • Run a simple example.
  • Install Python packages.
  • Run JSL script from Python.
  • Send a Python variable to JSL.
  • Create a JMP data table from Python.

 

Let's start with how to find the new Python Editor.

 

Next, let's next see a simple example in Python and how to reveal the embedded log:

 

Once you've determined which packages are installed, watch how to install a new one and how to upgrade pip. 

The code I used is below: 

import jmp
import jmputils

#listing packages installed
jmputils.jpip('list')

#Installing function
jmputils.jpip('install','numpy pandas')

#Upgrade pip
jmputils.jpip('install --upgrade', 'pip setuptools') 

 

 

Next, let's learn about the jmp.run_jsl function that encapsulates a JSL script in Python. 

The example python code I used is as follows: 

import jmp

jmp.run_jsl(
'''
//this is a JSL comment
Open ("$Desktop/Wafer Stacked.csv")

'''
)


Now imagine that a CSV data table has been imported with pandas into Python. If we want to send it to the JSL script as a variable, we can use the Python Get function and leverage the JSL functions such as Graph Builder. 

The code is as follows: 

import jmp
import pandas as pd

pd_dt= pd.read_csv("Wafer Stacked.csv")
print (pd_dt.head());


jmp.run_jsl('''

	jmp_dt= Python Get (pd_dt);

	jmp_dt<<
	Graph Builder(
		Size( 567, 444 ),
		Show Control Panel( 0 ),
		Show Legend( 0 ),
		Variables( X( :X_Die ), Y( :Y_Die ), Color(:Defects) ),
		Elements( Heatmap( X, Y, Legend( 5 ) ) )
	);


''')

 

Finally, let's create a new JMP data table using Python and the "jmp" module. In this example, I am using a csv file and the pandas package but this can be applied to any other type of files, especially those that cannot be opened directly in JMP.

 

The python code is as follows:
#Creating a JMP data table using python
import jmp
import pandas as pd
pd_dt=pd.read_csv("Wafer Stacked.csv")
print(pd_dt.columns)

jmp_dt=jmp.DataTable("Wafer table created with python", len(pd_dt))

#adding the Lot column
#jmp_dt.new_column(pd_dt.columns[0],jmp.DataType.Character)
#jmp_dt[0]=pd_dt[pd_dt.columns[0]].astype(str)

#adding all columns
for i in range(len(pd_dt.columns)):
	jmp_dt.new_column(pd_dt.columns[i],jmp.DataType.Character)
	jmp_dt[i]=pd_dt[pd_dt.columns[i]].astype(str)
 

Want more detail? See the Developer Tutorial: New Python Integration and Scripting Capabilities in JMP 18 presented by Paul Nelson, the lead JMP developer for Python integration.

Last Modified: Aug 14, 2025 9:08 AM
Comments