I'm trying to assign speed values to street types using TIGER street shapefiles. So I created the new field for the speed, and I was going to use the field calculator to take the MTFCC classifications and fill the speed field from that, using a simple replace script.
I have this simple script that I found from another question that someone asked. I plugged my fields and values in and repeated the replace.
def Calc(value):
if "S110" in value:
return value.replace('S1100','65')
if "S1200" in value:
return value.replace('S1200','45')
if "1400" in value:
return value.replace('S1400','30')
if "S1500" in value:
return value.replace('S1500','15')
if "S1630" in value:
return value.replace('S1630','25')
if "S1640" in value:
return value.replace('S1640','25')
However, when I run it, it seems to run fine, but my fields are still Null. I really have no experience with Python, so I'm not even sure where I'm going wrong with the script.