RapidMiner 9.8 Beta is now available

Be one of the first to get your hands on the new features. More details and downloads here:

GET RAPIDMINER 9.8 BETA

How to create new Rows data based on split character values in Column data

VanlalVanlal Member Posts: 10 Contributor II
edited September 11 in Help
I have data like as below
  
Name Subject Grade
John Eng,Math A,B
Clarice Eng,Science O,B
Kennedy Math O
Kevin Eng A

How do i generate new rows based on the column which has , on them

Name Subject Grade
John Eng A
John Math B
Clarice Eng O
Clarice Science B
Kennedy Math O
Kevin Eng A

Best Answer

Answers

  • VanlalVanlal Member Posts: 10 Contributor II
    <?xml version="1.0" encoding="UTF-8"?><process version="9.6.000">  <context>    <input/>    <output/>    <macros/>  </context>  <operator activated="true" class="process" compatibility="9.6.000" expanded="true" name="Process">    <parameter key="logverbosity" value="init"/>    <parameter key="random_seed" value="2001"/>    <parameter key="send_mail" value="never"/>    <parameter key="notification_email" value=""/>    <parameter key="process_duration_for_mail" value="30"/>    <parameter key="encoding" value="SYSTEM"/>    <process expanded="true">      <operator activated="true" class="retrieve" compatibility="9.6.000" expanded="true" height="68" name="Retrieve resulttest" width="90" x="45" y="34">        <parameter key="repository_entry" value="//Local Repository/data/resulttest"/>      </operator>      <operator activated="true" class="split" compatibility="9.6.000" expanded="true" height="82" name="Split" width="90" x="179" y="34">        <parameter key="attribute_filter_type" value="all"/>        <parameter key="attribute" value=""/>        <parameter key="attributes" value=""/>        <parameter key="use_except_expression" value="false"/>        <parameter key="value_type" value="nominal"/>        <parameter key="use_value_type_exception" value="false"/>        <parameter key="except_value_type" value="file_path"/>        <parameter key="block_type" value="single_value"/>        <parameter key="use_block_type_exception" value="false"/>        <parameter key="except_block_type" value="single_value"/>        <parameter key="invert_selection" value="false"/>        <parameter key="include_special_attributes" value="false"/>        <parameter key="split_pattern" value=","/>        <parameter key="split_mode" value="ordered_split"/>      </operator>      <operator activated="true" class="de_pivot" compatibility="9.6.000" expanded="true" height="82" name="De-Pivot" width="90" x="313" y="34">        <list key="attribute_name">          <parameter key="Subject" value="Subject.*"/>          <parameter key="Grade" value="Grade.*"/>        </list>        <parameter key="index_attribute" value="id"/>        <parameter key="create_nominal_index" value="false"/>        <parameter key="keep_missings" value="false"/>      </operator>      <connect from_op="Retrieve resulttest" from_port="output" to_op="Split" to_port="example set input"/>      <connect from_op="Split" from_port="example set output" to_op="De-Pivot" to_port="example set input"/>      <connect from_op="De-Pivot" 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"/>    </process>  </operator></process>

    It is working now .. Thank you
Sign In or Register to comment.