The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

how i can do it : PostalCode : the first prefix of the PostalCode. For example if it 49278 make it 4

inas_ayinas_ay Member Posts: 1 Learner I
edited November 2018 in Help
i have adata set with postalCode attr , please help me to make this in  generate attributes

Answers

  • M_MartinM_Martin RapidMiner Certified Analyst, Member Posts: 125 Unicorn
    Hi inas_ay: Take a look at the Cut function - it is similar to the Excel MID function.  You can use that with the Generate Attributes operator.  If I understood your question properly, that should do the trick.  If you still have any questions, write back.  Best Wishes, Michael Martin 
  • Telcontar120Telcontar120 RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,635 Unicorn
    The "prefix" function inside the Generate Attributes operator will also more directly do what you want.  The arguments you enter are the string variable to prefix and the number of positions you want to get (starting in the first position).  So for example "prefix(PostalCode,1)" will return the first digit of the postal code.


    Brian T.
    Lindon Ventures 
    Data Science Consulting from Certified RapidMiner Experts
Sign In or Register to comment.