Jump to content

Fastest way of getting multiple value from table into python


Nikita Belooussov

Recommended Posts

Hi

I am currently using

tCursors=tuple(cursors) for row in myTable.GetRows(tCursors): for i in range(0,len(cursors)): curValue=cursors.CurrentValue

to get values from a data table in spotfire. The tuple contains the cursors for all of the columns that I am interested in. Is there a faster way to obtain multiple values from the data table, possibly loading them into an array, or loading the entire data table into a 2d array

Sorry that this is vague, I am just not sure what options I have to get the data from the spotfire table into python in a format that can be used. Thank you

Link to comment
Share on other sites

This would depend on what you are trying to achieve with the values. Currvalue will have only one value at a time. if you are looking for specific value, you can use getdistinctrows instead of getrows followed by if clause or concatenate all the column values in a calculated column and read values from calculated column then you will not need two for loops.
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...