Return multiple dataframes from python snippet

Hi I have a python code which returns more than 2 data frames. currently we can send max of 2 outputs by using python snippet 2=>2. Is there any way to accommodate this?

Hi sasa076,

I’m afraid there’s no really elegant solution for this. Two things that come to mind would be:

  • Append the excessive outputs of the node to one of the two “regular” output data frames. Such a combined output data frame would look like this:

    Columns of regular table Columns of first excessive output Columns of second excessive output
    Records of regular table Missing values Missing values
    Missing values Records of first excessive output Missing values
    Missing values Missing values Records of second excessive output

    etc., and split them again after the node, e.g., using the Column Splitter and Row Filter nodes.

or

  • Manually write out the data frames, e.g., using DataFrame.to_csv and read in the generated CSV files using the File Reader or CSV Reader nodes.

Marcel

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.