How to send output from Panda data frames into Reporting documents and downstream in Python Node of a Statistica workspace?

How to send output from Panda data frames into Reporting documents and downstream in Python Node of a Statistica workspace?

book

Article ID: KB0076955

calendar_today

Updated On:

Products Versions
Spotfire Statistica 13.3 and higher

Description

PRE-REQUISITES:
Python 2.x installation with pandas (or)
Python 3.x installation with pandas


This article discusses how we can export a data frame from Python pandas to a Statistica spreadsheet in Python node of a Statistica workspace. For the sake of simplicity, we'll assume that we take the incoming spreadsheet and pass it to the Reporting documents of the workspace.We will assign the Activedataset (input node) to a data frame with the statement : df = ActiveDataSet['Characteristics']

User-added image

Issue/Introduction

How to send output from Panda data frames into Reporting documents and downstream in Python Node of a Statistica workspace?

Resolution

To output to the Reporting documents of the workspace, add RouteOutput([name of dataframe variable],'[Name of Spreadsheet']). For this example, we will use : RouteOutput(df,'Characteristics'). To make the spreadsheet output available for downstream nodes of Python node, add RouteOutput(df,'Characteristics',AsDownstream = True) as shown below:


User-added image