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

Lei
Lei New Altair Community Member
edited November 5 in Community Q&A
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

  • Caperez
    Caperez Altair Community Member
    Answer ✓
    Hi @Lei,

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

    Best, 
    Cesar

Answers

  • Caperez
    Caperez Altair Community Member
    Answer ✓
    Hi @Lei,

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

    Best, 
    Cesar