Looking for some help. I have a continuous variable (PCT_B100P) of the percentage of folks in a census tract that are under the 100% federal poverty line. I'm trying to use this variable to assign a categorical variable (POVCAT)to the census tract. If the value is below, between, or above certain limits it will determine what category the record gets. I'm not getting any errors in my code, buy it's only calculating the first category level 1, and nothing else. Here is my code.
def NumValue( PCT_B100P ):
if (PCT_B100P <5):
return 1
elif (PCT_B100P >= 5 and PCT_B100P <10):
return 2
elif (PCT_B100P >= 10 and PCT_B100P <20):
return 3
elif (PCT_B100P > 20):
return 4
Expression:
NumValue(!POVCAT!)
any idea as to what I'm doing wrong? I'm quite new to Python. Below is an image of my issue