Icon

02_​Output_​Data_​Tables

Output Data Tables with Python Script

This workflow shows how to write a Pandas DataFrame or a PyArrow Table as a KNIME table using the Python Script node. After writing the file, it can be used for other processes further down the pipeline as needed.

1 output table 2 output tables Writing Pandas DataFrame 1 output table 2 output tables Writing PyArrow Table 1) 1 output table with Pandas- A Pandas DataFrame is passed as a outputtable with knio.output_tables[0]2) 2 output tables with Pandas- Similar to above example, but with an additionaloutput port.- Add the second output port to the Python Scriptnode by clicking on the three dots- The second output table is passed withknio.output_tables[1] 1) 1 output table with PyArrow- A PyArrow table is passed as a output table withknio.output_tables[0]2) 2 output tables with PyArrow- Similar to above example, but with an additionaloutput port.- Add the second output port to the Python Scriptnode by clicking on the three dots- The second output table is passed withknio.output_tables[1] Adopting Python Bundled Packages : Download and open this workflow to auto-install requirements and execute the Python scripts. This workflow uses a node from KNIMEPython Integration, which installs Python and a number of pre-defined packages on your system. Supported on KNIME Analytics Platform4.7 or higher. Python Script Python Script Python Script Python Script Table Writer Table Writer Table View Table View Table View Table View 1 output table 2 output tables Writing Pandas DataFrame 1 output table 2 output tables Writing PyArrow Table 1) 1 output table with Pandas- A Pandas DataFrame is passed as a outputtable with knio.output_tables[0]2) 2 output tables with Pandas- Similar to above example, but with an additionaloutput port.- Add the second output port to the Python Scriptnode by clicking on the three dots- The second output table is passed withknio.output_tables[1] 1) 1 output table with PyArrow- A PyArrow table is passed as a output table withknio.output_tables[0]2) 2 output tables with PyArrow- Similar to above example, but with an additionaloutput port.- Add the second output port to the Python Scriptnode by clicking on the three dots- The second output table is passed withknio.output_tables[1] Adopting Python Bundled Packages : Download and open this workflow to auto-install requirements and execute the Python scripts. This workflow uses a node from KNIMEPython Integration, which installs Python and a number of pre-defined packages on your system. Supported on KNIME Analytics Platform4.7 or higher. Python Script Python Script Python Script Python Script Table Writer Table Writer Table View Table View Table View Table View

Nodes

Extensions

Links