0 / 0
reclassifynode properties

reclassifynode properties

Reclassify node iconThe Reclassify node transforms one set of categorical values to another. Reclassification is useful for collapsing categories or regrouping data for analysis.

Example

node = stream.create("reclassify", "My node")
node.setPropertyValue("mode", "Multiple")
node.setPropertyValue("replace_field", True)
node.setPropertyValue("field", "Drug")
node.setPropertyValue("new_name", "Chemical")
node.setPropertyValue("fields", ["Drug", "BP"])
node.setPropertyValue("name_extension", "reclassified")
node.setPropertyValue("add_as", "Prefix")
node.setKeyedPropertyValue("reclassify", "drugA", True)
node.setPropertyValue("use_default", True)
node.setPropertyValue("default", "BrandX")
node.setPropertyValue("pick_list", ["BrandX", "Placebo", "Generic"])
Table 1. reclassifynode properties
reclassifynode properties Data type Property description
mode Single Multiple Single reclassifies the categories for one field. Multiple activates options enabling the transformation of more than one field at a time.
replace_field flag  
field string Used only in Single mode.
new_name string Used only in Single mode.
fields [field1 field2 ... fieldn] Used only in Multiple mode.
name_extension string Used only in Multiple mode.
add_as Suffix Prefix Used only in Multiple mode.
reclassify string Structured property for field values.
use_default flag Use the default value.
default string Specify a default value.
pick_list [string string … string] Allows a user to import a list of known new values to populate the drop-down list in the table.
Generative AI search and answer
These answers are generated by a large language model in watsonx.ai based on content from the product documentation. Learn more