While many operations can be performed using Pyplan’s wizards, more advanced tasks sometimes require editing the code of individual nodes. For this purpose, Pyplan provides a full code editor, available through the Code+Result view.
To open the editor, we select a node in the influence diagram and then choose the Code+Result view. This displays:
In the example below, the code definition creates two new columns, win and dblfaults, from the original DataFrame:

In the code definition (Code Window) you can see how two new columns “win” and “dblfaults” are created from the original Dataframe according to the following instructions:
# Assign dataframe to the variable '_df'.
_df = data
# Create new column that checks if Federer won.
_df['win'] = _df['winner'] == 'Roger Federer'
# Create new column that calculates the % of double faults in each match.
_df['dblfaults'] = _df['player1 double faults'] / _df['player1 total points total']
result = _df
We can freely modify the code in the coding window and then re‑run the node to immediately see how those changes affect the result. This interactive workflow lets us refine calculations, test alternatives, and validate our logic directly within the node.
When we are viewing a node’s code, we can hover the cursor over a variable or function name to see a tooltip. After a short delay, Pyplan shows a small preview with helpful information about the selected element, such as its current value (when available) or a brief description. This lets us inspect variables and functions without leaving the coding window or adding extra print statements.

IntelliSense is Pyplan’s code‑completion assistant. It provides several features—member list, parameter information, quick info, and full‑word completion—that help us write Python code faster and with fewer errors.
Key behaviors:
.), IntelliSense shows a list of valid members (attributes, methods, or properties) for the current object or namespace.NP for NetProfit).Together, Tooltip and IntelliSense make the coding window more informative and help us understand and write node definitions more efficiently.

The Pyplan Assistant is an integrated code helper that we can use directly from the coding window to generate or modify node definitions.
When we click the Show/hide code assistant icon in the top‑right corner of the coding window, a text bar appears above the code with the message “Enter your code generation request”.

In this bar we can:
win is true”).After we send the request, the Assistant returns Python code adapted to the current node. We can review this proposal and, if we agree, apply it so that the node definition is updated automatically to perform the requested operation. If we want to go back to a previous version of the code or move forward again, we can use the circular arrow icons in the coding window (Undo / Redo) to navigate between code changes made before and after using the Assistant.
