Python integration requires embedPy
Kx Analyst has usability integrations with Python through the use of embedPy. If embedPy is installed in the kdb+ process Analyst is running in, users can enable Python integration from the File > User Settings menu in Analyst.
Once Python integration is enabled, and embedPy is installed and loaded (using
the following integrations will be available.
.p files in Analyst are interactive in a similar way to regular
q editors. At any point, Python text can be selected and run by using the editor context-menu
Move data between kdb+ and Python
Moving data between the q and Python execution environments can be done directly through the embedPy API, or through the Analyst UI as follows:
Sidebar process view
In the Process View tab of the Analyst sidebar, any selected data can be sent to the Python environment through the sidebar context-menu as seen below.
Once the Python integrations are enabled, expressions can be assigned to either execution environment through the use of the editor context-menus.
If in a q editor, select an expression or variable and select
Set Variable in Python.
If in a Python editor, the same can be done to move data to q as seen in the interactive editor.