I need to populate a column (Level4Code) with the field calculator that counts sequentially based on another column (Level3Name) and includes 4 digits. Here is an example of a table that's already populated correctly:
The out of the box sequential code does not do it correctly since it doesn't loop based on any other column.
So far, I've tried this code snippet to count but I am not getting the results I need. This only seems to count the total number of times that word in Level3Name is present:
Any suggestions? I am new to Python so any help would be great.