Modelerデータ加工Tips#02 出題用サンプルコード
python
stream = modeler.script.stream()
node1 = stream.create("userinput", "Input")
node1.setXYPosition(100,100)
node1.setPropertyValue("names", ["Time","Temperature"])
node1.setKeyedPropertyValue("data", "Time", "1;12")
node1.setKeyedPropertyValue("custom_storage", "Time", "Integer")
node1.setKeyedPropertyValue("data", "Temperature", "11 12 13 14 15 16 18 20 22 24 26 28 ")
node1.setKeyedPropertyValue("custom_storage", "Temperature", "Integer")
node1.setPropertyValue("data_mode", "Ordered")
node2 = stream.create("filler", "Filler")
node2.setXYPosition(300,100)
node2.setPropertyValue("fields", ["Temperature"])
node2.setPropertyValue("replace_mode", "Conditional")
node2.setPropertyValue("condition", "Temperature = 13 or Temperature = 14 or Temperature = 20 or Temperature = 22")
node2.setPropertyValue("replace_with", "undef")
stream.link(node1, node2)
出題は以下