I don’t find node for change only a specific data in cell
In this file upload .I would like change only the data 'Yes ’ surrounded by ‘No’ without modified the other ‘Yes’ in the columns.
Is it possible ?
I don’t know whether it’s possible to change a single cell manually. I think not, but I’m not sure.
There’re several non-manual ways though, but we need the conditions to single out this specific row. It’s basically this: If row meets conditions, change value, otherwise leave it as it is.
This can be the row number, learned skills, completed training, etc.
If your aim is to replace the content of a cell directly in an Excel file, this is now possible using the -Excel Cell Updater- node:
As highlighted by @Thyme, if your need is rather to change a specific cell content in a KNIME table, you may use for instance a -Rule Engine- node if you know for instance the name of the column (i.e. “Have you completed any …”) and the index of the Row (i.e. RowIndex = 14).
Thank you very much aworker
Is it possible for you to give my the script example if I used Rule Engine node and I would like changed the value of Row index=14 on the column (“have you completed…”)?
Hello @ghizlaine,
What @Thyme mentioned in his first post has its logic. You need logic rules to achieve big tasks that couldn’t be escalated or repetible.
Since your data is Boolean (1 and 0), you just have to calculate two columns: ‘n-1’ and ‘n+1’. The logical behind these columns could be ‘surrounded by NO above’ and ‘surrounded by NO below’…
Once you get these three columns: value Yes/No (that you already have) and the two logical indexing columns, a ‘Rule Engine’ node can solve the question… The Yes-No-No combination is your filter.
You can build your logics easily with ‘Moving Aggregation’ node (window length 2 and 2 backwards…) and Math Formula node.
I am busy now in order to build a workflow example, but if you need further help any of my forum colleagues or myself (overnight time) can do it.
As mentioned by @Thyme and @gonhaddock, we all be happy in the KNIME forum to help you. Could you please post here your excel file (if it is not confidential) so that it is easier for us to provide you with a workflow solution?
I was slightly confused as to what you were trying to do. Initially I thought the intention was to change all “Yes” items to “No” if they had a “No” immediately above and below, but then later you were only talking about row 14, whereas there are a number of rows for which that original rule would match.
The attached flow demonstrates how to use a Rule Engine to change the value of a column in a specific (pre-determined) row, by hard-coding the required row number. In the Rule Engine row numbering begins at zero, so row 14 as an ROW INDEX of 13. This isn’t always the case in other KNIME nodes, where some start at row 1, but that’s a topic that has been debated elsewhere.
The flow also demonstrates how you could use the Lag Column node to determine the value of the row that comes before each row, and the value that comes after (by reversing the sort order). A rule engine can then be used to update all rows matching the required condition.