Print
Print using Python Send
Example 1
Summary: Adds new rows to a JMP data table and retrieves the updated dataset using Python Send and Get commands.
Code:
iris = Open("data_table.jmp");
Python Send( iris );
commands = "\[
iris.add_rows(5) # add 5 rows to the end of the table
setW = iris[1] # indexed starting with 0
#print(setW)
]\";
Python Submit( commands );
jdt = Python Get( iris );
Code Explanation:
- Open data table;
- Send dataset to Python.
- Define Python commands.
- Submit Python commands.
- Retrieve updated dataset.
Example 2
Summary: Adds rows to a data table and retrieves the updated dataset using Python commands.
Code:
iris = Open("data_table.jmp");
Python Send( iris );
commands = "\[
iris.add_rows(5, -1) # add 5 rows to the end of the table
setW = iris[1] # indexed starting with 0
#print(setW)
]\";
Python Submit( commands );
jdt = Python Get( iris );
Code Explanation:
- Open data table;
- Send dataset to Python.
- Define Python commands.
- Add 5 rows to dataset.
- Set variable
setW. - Submit Python commands.
- Retrieve updated dataset.
- Store in
jdt.
Example 3
Summary: Adds new rows to a data table and assigns the first column to a set, utilizing Python commands in JMP.
Code:
iris = Open("data_table.jmp");
Python Send( iris );
commands = "\[
iris.add_rows(5, at = 10) # add 5 rows after row 10
setW = iris[1] # indexed starting with 0
#print(setW)
]\";
Python Submit( commands );
jdt = Python Get( iris );
Code Explanation:
- Open data table;
- Send dataset to Python.
- Define Python commands.
- Add 5 rows after row 10.
- Assign first column to setW.
- Submit Python commands.
- Retrieve updated dataset.
Example 4
Summary: Adds rows to a data table and sets the first row using Python commands in JMP.
Code:
iris = Open("data_table.jmp");
Python Send( iris );
commands =
"\[
iris.add_rows(5, at = 0) # add 5 rows at the beginning of the table
setW = iris[1] # indexed starting with 0
#print(setW)
]\";
Python Submit( commands );
jdt = Python Get( iris );
Code Explanation:
- Open data table;
- Send dataset to Python.
- Define Python commands.
- Add 5 rows to dataset.
- Set first row.
- Submit Python commands.
- Retrieve updated dataset.