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!]
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.