Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Multiple Field Parse, Greatest Value Label

$
0
0
I'm trying to get a label script to work in ArcMap. So far it works, but it's not 100% accurate. For the most part it seems to be working but there are certain labels that are wrong. My code looks at three fields and is supposed to return the specified label/string for whichever field has the greatest value. I'm very new to working with Python so I don't know what I'm doing wrong.

def FindLabel ( [IND_06] , [RET_06], [OTH_06] ):
if [IND_06] > [RET_06] and [IND_06] > [OTH_06] :
return "Industrial"
elif [RET_06] > [IND_06] and [RET_06] > [OTH_06]:
return "Retail"
elif [OTH_06] > [RET_06] and [OTH_06] > [IND_06]:
return "Other"
else:
return "None"


Thank you for any help.

Viewing all articles
Browse latest Browse all 2485

Trending Articles