def Reclass(n): valueDict = {1 : 2, 2 : 2, 3 : 1, 4 : 1, 5 : 1, 6 : 1, 7 : 1} return valueDict Weight = Reclass(!Value!)
def Reclass(n): if ( n == 1): return 2 ....
try double equals sign to compare if ( !Value! == 1):also your function call should be Reclass(!Value!)Is Value the name of the field?
if ( !Value! == 1):
def Reclass( !Value! ): valueDict = {1 : 2, 2 : 2, 3 : 1, 4: 1, 5 : 1, 6 : 1, 7: 1} !VALUE! = valueDict[!VALUE!]
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.