This document (including, without limitation, any product roadmap or statement of direction data) illustrates the planned testing, release and availability dates for Spotfire products and services. It is for informational purposes only and its contents are subject to change without notice. Planning to implement - generally 6-12 months out. Likely to Implement - generally means 12-18 months out.
Copyright © 2014-2023 Cloud Software Group, Inc. All Rights Reserved.
Cloud Software Group, Inc. ("Company") follows the EU Standard Contractual Clauses as per the Company's Data Processing Agreement.
Terms of Use |
Privacy Policy |
Trademarks |
Patents |
Contact Us
This should really be considered a bug. Due to the nature of the way the dataframe is written back to a Statistica spreadsheet, any number-like strings will be converted to numbers (ie. the string "01875" becomes "1875"), since the functions in PyWrapper.py do not properly handle text fields.
It is generally accepted that the "object" data type in pandas is synonymous with text variables. A simple fix for PyWrapper.py to output a text variable properly could be done by inserting the following python code after line 334 in the pandas_data_frame_as_spreadsheet function:
if df[str(df.columns[i])].dtype == 'object':
maxlength = df[str(df.columns[i])].str.len().max()
ssObj.VariableSetTextType(i+1,maxlength)
This will convert the output spreadsheet variable to a text column if the data frame column is an object data type. Implementing a similar solution to this in a future version would be very helpful.