I have a shapefile that I am trying to sort a specific field but for some weird reason it changing the shape of the features, . The following does short the field I want but it is making the features bigger. I am not sure why this is happening?
BPs ="BPs1"
data = []
with arcpy.da.SearchCursor(BPs,"*") as cursor:
for row in cursor:
data.append(row)
data.sort(key=lambda tup: tup[21]) # sorts based on the 21st field
count = 0
with arcpy.da.UpdateCursor(BPs,"*") as cursor:
for row in cursor:
row = data[count]
count += 1
cursor.updateRow(row)