Jun-15-2019, 07:08 AM
Hello,
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 ROM
I am trying to
1. convert anything starts with ABC* to a number (for ex: 1)
2. convert anything contains ROM to a number (for ex: 2)
Can you suggest please?
Thanks in advance.
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 ROM
I am trying to
1. convert anything starts with ABC* to a number (for ex: 1)
2. convert anything contains ROM to a number (for ex: 2)
Can you suggest please?
Thanks in advance.