fc = r'path\to\your\featureClass' rows = arcpy.UpdateCursor(fc) for row in rows: row.Land_Use = int(''.join([i for i in row.PopUp if i.isdigit()])) rows.updateRow(row)
import re fc='file path' rows=arcpy.UpdateCursor(fc) for row in rows: row.FieldName = re.search('LAND USE CODE</td>\n<td>(\d*)<' , row.PopUp).group(1) rows.updateRow(row)
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.