I have a df that a columns with some ID for companies. How can I split this ID in columns?
In this column the values can be 0(NaN) to more than 5 IDs, how to divide each one of them in separate columns?
Here is an example of the column:
0 4773300
1 NaN
2 6201501,6319400,6202300
3 8230001
4 NaN
5 4742300,4744004,4744003,7319002,4729699,475470
The division would be at each comma, I imagine an output like this:
| columnA | columnB | columnC |
|---|---|---|
| 4773300 | Nan | Nan |
| NaN | Nan | Nan |
| 6201501 | 6319400 | 6202300 |
| 8230001 | Nan | Nan |
And so on depending on the number of IDs