I need to split a dataframe column into multiple columns to make sure only two value is contained within each cell. The current dataframe looks like:
Name | Number | Code |
..............................
Tom | 78797071| 0
Nick | | 89797071
Juli | | 57797074
June | 39797571| 0
Junw | | 23000000|
if code contain 8 digit number then split every two digit number in each column and if 00 comes in any of the DIV it should be marked as 'incomplete'
The new dataframe should look like:
Name | Number | Code | DIV|DIV2|DIV3|DIV4|Incomplete |
........................................................................
Tom | 78797071| 0 | 0 | 0| 0 | 0 |incomplete |
Nick | | 89797071| 89| 79 | 70 | 71 |complete |
Juli | | 57797074| 57| 79 | 70 | 74 |complete |
June | 39797571| 0 | 0| 0| 0 | 0 |complete |
Junw | | 23000000| 23| 00| 00 | 00 |incomplete |