Zaira,
Thank you, I understand now what you are attempting. Couple of additional questions;
1) can you include the ID in your original table before your transpose the additional records.
2) are you attempting to only assign an ID based upon ndr_est, correct? or will it also be dependent upon edo as well?
3) do you have another table with the wanted ID and ndr_est values available? If so, you can perform a temporary attribute Join in ArcGIS using the ndr_est values and use field calculator to copy the ID values from one table to another then remove the join. Please see Overview of joins and relates—ArcGIS Pro | ArcGIS Desktop.
4) are you comfortable with python scripts? If so, you can use something along the lines of the following:
import arcpy
def unique_values(table , field):
with arcpy.da.SearchCursor(table, [field]) as cursor:
return sorted({row[0] for row in cursor})
fc = r'C:\path\to\MyGDB.gdb\MyTable'
lst = unique_values(fc, 'nbr_est')
with arcpy.da.UpdateCursor(fc, ['nbr_est', 'ID']) as cursor:
for row in cursor:
row[1] = lst.index(row[0])
cursor.updateRow(row)
This script runs standalone and will create a list of unique values from the field 'nbr_est' in the table or feature class "MyTable" contained in the GBD "MyGDB.gdb". The second part of the script uses the index position of the unique value in the list to assign an integer ID based upon the contents of 'nbr_est'. Please do note, this script will not always return the same ID for a given 'nbr_est' value, especially if additional rows have been added to the table or feature class containing additional 'nbr_est' values. However, if you are running it once this should work well to set the initial ID values.