The RapidMiner community is on read-only mode until further notice. Technical support via cases will continue to work as is. For any urgent licensing related requests from Students/Faculty members, please use the Altair academic forum here.
Extract exact number
abbaszavar
Member Posts: 11 Contributor I
Hi there
I have an excel file in one column and each row include health information regarding a patient.
How can I extract the amount of blood pressure in each row?
Example: bp = 120 (how can I extract 120 in a seperate column in the output?)
Please advise.
Thanks,
Abbas
0
Best Answer
-
sgenzer Administrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM Moderator Posts: 2,959 Community Manager
hello @abbaszavar - it is good to have you here. I would use Generate Attributes (best operator in RapidMiner IMHO) and do something like this if your column is labeled att1:
bloodPressure parse(suffix(att1, length(att1) - index(att1,"=") - 2))
Scott
0
Answers
Hi Scott,
Thanks for your reply.
It is just works if my variable was in the end of the line. Actually sometimes I have the same variable and its amount in the beginning or middle the line.
Could you please let me know how I can modify algorithm to can cover all possibilities?
Thanks in advance,
Abbas
hello @abbaszavar - in that case you should probably use a RegEx expression and slice+dice from there.
Scott