I am trying to come up with a code that will allow me to re-categorize a column in a data set that contains short comments from survey by doing the following:

1. If the comment is empty/NA/blank then assign "NO\_COMMENT"
2. If the short comment has the word "outdated" (lowercase, caps or in any combination) then assign "OUTDATED"
3. Any other comment will be left as it is

For example:
if I had the table

| NAME | COMMENT |
| --- | --- |
| Jean | "This website seems a bit outdated for me" |
| Dela | "I didnt like it" |
| Nate | NA |
| Josh | "Very outdated" |

then I will be expecting something like this:

| NAME | CATEGORY |
| --- | --- |
| Jean | OUTDATED |
| Dela | "I didnt like it" |
| Nate | NO\_COMMENT |
| Josh | OUTDATED |

Is there a library and documentation to do this?