I have a dataframe with 2 columns like the following:
| ColA | COLB |
|---|---|
| ABC | Null |
| Null | a |
| Null | b |
| DEF | Null |
| Null | c |
| Null | d |
| Null | e |
| GHI | Null |
| IJK | f |
I want to categories the “COLB” based on the “COLA” so that the final output look like :
| ColA | COLB |
|---|---|
| ABC | a,b |
| DEF | c,d,e |
| GHI | Empty |
| IJK | f |
How can I do this using pandas ?
