In the python snippet, how to handle row names?
Case 1) Access row names in existing table.
Case 2) Create new row names when the python script generates a new table.
Cheers,
Steve.
In the python snippet, how to handle row names?
Case 1) Access row names in existing table.
Case 2) Create new row names when the python script generates a new table.
Cheers,
Steve.
Hi,
I'm not sure this is what you want exactly but in any case :
For the first case, you can duplicate your row'id with the Row->other->Rowid in an other column in Knime before your python treatment. So you can access the names with python as you can access your other columns values.
For the second one you can do exactly the same, generate a column id in python in a list so that it will be a column as the others in your output and then use the Rowid node again in Knime to generate the names you want from this column.
Best regards
Fabien
Hi,
OK, this is actually what I ended up doing, but I had hoped that I'd just somehow missed the feature that allowed python to access the row names.
The R snippet manages it - but perhaps the R data frame makes this easy to do...
Cheers,
Steve.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.