I'm using field calculator in ArcGIS Desktop 10.2.1.
I have field1 which has a values of "A_B" (example). I created two fields out of this, values to the left of the underscore go in fielda and to the right of the underscore go in fieldb. I used the code below in field calculator to separate them out into two fields.
fielda =
field1.split("_")[-1]
fieldb =
`field1.split("_")[-1]`
I now have field1 with values of A_B_C_D. I need to separate the A_B_C_D into four separate fields using field calculator. fielda = A, fieldb = B, fieldc = C and so on. I'm not sure how to go about this. I basically need to parse the values by the underscore.