how to filter out rows in exampleset by an attribution in these rows containing regular expression

LeiLei Member Posts: 12 Learner I
I have a dataset. I want ot filter some rows when the rows match a condition.

For example, the dataset as follow:
word    value
rain/C       39
sunny       20
snow/d        10
wind/G     27
cloud        50

I want to filter out some rows, in which word contains letter "/C" or "/G". In fact, the condition should be any "/" + one uppercase letter.
(It is good to use regular experssion to give condition. So I can change based on different requirement)
So the result above should be like:
word    value
sunny     20
snow/d   10
cloud      50

Is there anyone who can help me?
Thank you very much.

Best Answer

  • Options
    ceaperezceaperez Member Posts: 525 Unicorn
    Solution Accepted
    Hi @Lei,

    In this case you can use a regular expression like this ["/]\w
    please find attached an example.

Sign In or Register to comment.