I have a data frame df_train which has a column sub_division.
The values in the column is look like below
ABC_commercial,
ABC_Private,
Test ROM DIV,
ROM DIV,
TEST SEC R&OM
I am trying to 1. convert anything starts with ABC* to a number (for ex: 1) 2. convert anything contains ROM and R&OM to a number (for ex: 2)
Thanks in advance.
Expected result:
1,
1,
2,
2,
2