book
Article ID: KB0071075
calendar_today
Updated On:
Description
You have an open source Python engine installed. This Python engine is outside of Spotfire platform. You now want to export the data frames from this external python engine to Spotfire SBDF files (Spotfire Binary Data Format), for further analysis in Spotfire.
Resolution
This can be done using the Spotfire SBDF writer for Python engines, which is included in the "spotfire" Python module.
Please refer to this python page for the python package "spotfire":
https://pypi.org/project/spotfire/#files1. First install the "spotfire" package in the external Python engine:
pip install spotfire
Alternatively, download the .whl file from
https://pypi.org/project/spotfire/#files and install it:
pip install spotfire-1.3.0-py2.py3-none-any.whl
2. After installing the spotfire module to the external Python engine, you can now use the following in your Python script to export the Python dataframes to SBDF files:
import spotfire.sbdf as sbdf
sbdf.export_data(df, "mydata.sbdf") # where df is your Pandas data frame, mydata.sbdf is created in the current working directory (alternatively, provide a full path like "C:\Temp\mydata.sbdf")
Issue/Introduction
This article describes how to export Python data frames to TIBCO Spotfire SBDF files from external python engines using the Spotfire SBDF writer