For example a dataframe as the Following
| Customer Name | Customer Group | | --- | --- | | ABC, PT | NaN | | DEF, PT | NaN | ....
the Customer Group field is filled with text before the comma hence the expected output is like this
Customer Name | Customer Group | --- | --- | | ABC, PT | ABC | DEF, PT | DEF ...
Does anyone know how to code this? I am guessing it will use regex