parse a nominal attribute

sebastian_gonzasebastian_gonza RapidMiner Certified Analyst, Member Posts: 52 Guru
edited August 2019 in Help



I want to parse the following nominal attribute an example is "01020202_drt234@tg" I want to create 3 colums the first containing what is before the "_" another from the "_" to the "@" and the last one with what remains, I saw a parse from numbers but not from a data type like this, is there an operator for this o how could I do it?


Thanks for your help


Best Answer

  • yyhuangyyhuang Administrator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 364 RM Data Scientist
    Solution Accepted

    Hi @sebastian_gonza,


    You can use split operator.


    <?xml version="1.0" encoding="UTF-8"?><process version="9.0.002">
    <operator activated="true" class="process" compatibility="9.0.002" expanded="true" name="Process">
    <process expanded="true">
    <operator activated="true" class="generate_data_user_specification" compatibility="9.0.002" expanded="true" height="68" name="Generate Data by User Specification" width="90" x="313" y="34">
    <list key="attribute_values">
    <parameter key="input" value="&quot;01020202_drt234@tg&quot;"/>
    <list key="set_additional_roles"/>
    <operator activated="true" class="split" compatibility="9.0.002" expanded="true" height="82" name="Split" width="90" x="447" y="34">
    <parameter key="split_pattern" value="_"/>
    <operator activated="true" class="split" compatibility="9.0.002" expanded="true" height="82" name="Split (2)" width="90" x="581" y="34">
    <parameter key="attribute_filter_type" value="single"/>
    <parameter key="attribute" value="input_2"/>
    <parameter key="split_pattern" value="@/&gt;
    <connect from_op="Generate Data by User Specification" from_port="output" to_op="Split" to_port="example set input"/>
    <connect from_op="Split" from_port="example set output" to_op="Split (2)" to_port="example set input"/>
    <connect from_op="Split (2)" from_port="example set output" to_port="result 1"/>
    <portSpacing port="source_input 1" spacing="0"/>
    <portSpacing port="sink_result 1" spacing="0"/>
    <portSpacing port="sink_result 2" spacing="0"/>

    Hope it helps.



Sign In or Register to comment.