AnsweredAssumed Answered

Is it possible to convert a table from excel to coded domain in arcmap?

Question asked by Trygve_r on Feb 22, 2019
Latest reply on Feb 25, 2019 by KKramer-esristaff

I have succeded when creating own dictionary:

domDict = {"code":"code description", (...) "code": "code description}

for code in domDict:

...     arcpy.AddCodedValueToDomain_management("file.gdb", "domain name", "code", "domDict[code]")

But after importing excel table i get it into this format (i.g. american presidents {0: u'George Washington', 1: u'John Adams', 2: u'Thomas Jefferson', 3: u'James Madison', 4: u'James Monroe', 5: u'John Quincy Adams', 6: u'Andrew Jackson', 7: u'Martin Van Buren', 8: u'William H. Harrison' }

i am wondering how to get dictionaries like this into my code above.

Outcomes