How to can I trail and eliminate extra separators in a simple maner
Casperjex
New Altair Community Member
Hi all at the moment I have this problem, I have done all the steps to remove missing values ("#") and obtain separators ("_") for each product in a row since this is a list of purchases. But I can't remove the extra "_". I would appreciate if any of you could help me.
Kind regards
Kind regards
Tagged:
0
Best Answer
-
Hi @Casperjex ,I am assuming you only want to remove the last "_", since you would otherwise change the information.One option would be the regular expression
_$
The dollar sign in the "Replace what" parameter represents the end of line.Do you know the "Map" Operator? It is also capable to handle regular expressions to some extent and you can enter several combinations in one Operator.
Additional Info: The Operator "Split" enables you to create one Attribute for each item just by providing a separator.Happy Mining,Edin5
Answers
-
Hi @Casperjex ,I am assuming you only want to remove the last "_", since you would otherwise change the information.One option would be the regular expression
_$
The dollar sign in the "Replace what" parameter represents the end of line.Do you know the "Map" Operator? It is also capable to handle regular expressions to some extent and you can enter several combinations in one Operator.
Additional Info: The Operator "Split" enables you to create one Attribute for each item just by providing a separator.Happy Mining,Edin5 -
Hi @Edin_Klapic,
Thank you so much, that's exactly what I intended to do, I what to perform a market basket analysis using FP-Growth and Association Rules, and I think last "_" separator was messing up all the retrieved information.
So using the "Split" operator I would be able to change my row examples into attributes? I was thinking maybe was best to transform all the examples into attributes and apply yes to all at the same time purchased items.
Thank you
Nuno0