Forum Discussion
SamiS
4 years agoFrequent Visitor
Replace or remove values that are not in specified format. (Find and keep values)
I am working with a bad quality dataset that has many annoying errors. Please help me with one that I haven't solved yet. There is two columns: SERIAL-NUMBER and DESCRIPTION - Serialnumber sho...
- 4 years ago
Thanks to all who answered!
In fact, I took a part from everybody's answer to build my own solution.
I created a new column where...
1...all acharacters but digits and used delimeters are removed.
2...text is splitted by any defined delimeter.
3...text is combined back with delimeter "-", but only if format is correct (4 digits + 4 digits)
serpiva64
Solution Sage
4 years agoHi,
if you have only that hyphen in your text, you can easily achieve this:
You have to:
- extract text before delimiter -
- extract last 4 characters
- extract text after delimiter -
- extract first 4 characters
- merge the two column
- remove columns not necessary
That's done
If this post is useful to help you to solve your issue consider giving the post a thumbs up
and accepting it as a solution !