Jump to content

Beginner to Spotfire, How to utilise the Python Data Function


Recommended Posts

Spotfire beginner here. I have been trying to use Python Data Function to add a calculated column to my Website Jazz Daily Internet Package. The Python code when run from the IDE is working, but when run inside the Python Data Function, it's throwing an error. I read that the column from Spotfire to Python is mapped as Pandas Series data, but I`m not sure how to make use of this information and make the necessary modifications so that the code runs inside Spotfire. I would like some guidance or if possible point me in the right direction.

Using Spotfire Analyst 10.10. Input: A Column from my table of datatype Integer. Output: Should be a Column of the datatype String.

Tried to iterate over the values of the column with the below code.

Code:

def affordability(value):

if value>1000.00:

print ("Price is more than 1000")

elif 500.00

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...