Hub
Pricing About
  • Software
  • Blog
  • Forum
  • Events
  • Documentation
  • About KNIME
  • KNIME Community Hub
  • Nodes
  • Python Script (legacy)
NodeNode / Manipulator

Python Script (legacy)

Scripting Python (legacy)
Drag & drop
Like
Copy short link

Allows executing a Python script in a local Python environment. The environment has to be configured under File → Preferences → KNIME → Python or via flow variable, as described in the KNIME Python Integration Installation Guide .
This node supports Python 2 and 3. It also allows to import Jupyter notebooks as Python modules via the knime_jupyter module that is available in the node's Python workspace.
Multiple input and output ports of various types can dynamically be added to the node and used in the script. See section Ports below for a description of all available inputs and outputs, and how they can be addressed in the Python script.

Node details

Input ports
  1. Type: Table
    Table
    No description available
Output ports
  1. Type: Table
    Table
    No description available
Input object (pickled) (Dynamic Inport)
An input object. Input objects are automatically unpickled and made available to the Python script as variables whose names follow the scheme: input_object_ . For example, variable input_object_1 refers to the object at the first inbound Pickled object port.
  1. Type: Python
Input table (Dynamic Inport)
An input table. In the Python script, input tables are available as variables of type pandas.DataFrame . The names of the variables follow the scheme: input_table_ . For example, variable input_table_1 refers to the table at the first inbound Table port.
  1. Type: Table
Output table (Dynamic Outport)
An output table. The corresponding variable must be defined in the Python script. It must be of type pandas.DataFrame and its name must follow the scheme: output_table_ . For example, in order to populate the first outbound Table port, variable output_table_1 must be defined as described.
  1. Type: Table
Output image (Dynamic Outport)
An output image. The corresponding variable must be defined in the Python script. It must be either a string describing an SVG image or a byte array encoding a PNG image. Its name must follow the scheme: output_image_ . For example, in order to populate the first outbound Image port, variable output_image_1 must be defined as described.
  1. Type: Image
Output object (pickled) (Dynamic Outport)
An output object.The corresponding variable must be defined in the Python script. It can be of any type that can be pickled. Its name must follow the scheme: output_object_ . For example, in order to populate the first outbound Pickled object port, variable output_object_1 must be defined as described.
  1. Type: Python

Extension

The Python Script (legacy) node is part of this extension:

  1. Go to item

Related workflows & nodes

  1. Go to item
  2. Go to item
  3. Go to item

No known nodes available

KNIME
Open for Innovation

KNIME AG
Talacker 50
8001 Zurich, Switzerland
  • Software
  • Getting started
  • Documentation
  • E-Learning course
  • Solutions
  • KNIME Hub
  • KNIME Forum
  • Blog
  • Events
  • Partner
  • Developers
  • KNIME Home
  • KNIME Open Source Story
  • Careers
  • Contact us
Download KNIME Analytics Platform Read more on KNIME Business Hub
© 2023 KNIME AG. All rights reserved.
  • Trademarks
  • Imprint
  • Privacy
  • Terms & Conditions
  • Credits