in_fc = r'path/to/your/feature_class' with arcpy.da.UpdateCursor(in_fc, ['Cutwidth', 'Toothware']) as uc: for row in uc: # with update cursor you can read data cutwidth = row[0] toothware = row[1] # but also update them (use whatever formulas you need) if cutwidth == 8: row[1] = cutwith + 10.0 elif cutwidth == 12: row[1] = cutwith * cutwidth - 15.0 elif cutwidth == 16: row[1] = cutwith * 0.5 + 20.0 else: row[1] = -9999 # don't forget to store your changes: uc.updateRow(row)
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.