Hi,
I have a particular requirement (I can't modify it with something else as other part of my task is assigned like that).
I have a column which has more than 10K records. Many of the records in them have some data after some common endings. I would like to strip of the data after those common ending words. I am pasting a sample data here along with desired output that I want. I have tried multiple posts but can't really figure this out.
In the below sample, Street 1 is that column where I need to place the logic. It has some records ending with some common words such as ave and home (for example in my data). I have a list of such words (around 6-7) with me. Whenever I see those words, I keep anything that is on right of them. Can you please advise me how to do this?
| street 1 | stree 2 | zip |
| 107 spalding trail ABC | 123 | 123 |
| 107 spalding ave 123 | 234 | 234 |
| 107 spalding home Abc | 345 | 345 |
| 107 remona trail 1 | 123 | 123 |
| 107 remona av 2 | 234 | 234 |
| 107 remona ave 3 | 345 | 345 |
| | | |
| DESIRED OUTPUT BELOW | | |
| street 1 | stree 2 | zip |
| 107 spalding trail ABC | 123 | 123 |
| 107 spalding ave | 234 | 234 |
| 107 spalding home | 345 | 345 |
| 107 remona trail 1 | 123 | 123 |
| 107 remona av 2 | 234 | 234 |
| 107 remona ave | 345 | 345 |