How to replace values in an attribute table for one column?
Question: I need to replace values in an attribute table for one column (replace zeroes
in column named "label" to 100). Is this possible using ogr or python? I have
to do this for 500+ shapefiles.


Answer: In the Esri ArcGIS realm, [Update
Cursors](http://resources.arcgis.com/en/help/main/10.2/index.html#//018w00000014000000)
are typically used for this type of operation.

For example

    
    
    import arcpy
    
    # Your input feature class
    fc = r'C:\path\to\your.gdb\feature_class'
    
    # Start an update cursor and change values from 0 to 100 in a field called "your_field"
    with arcpy.da.UpdateCursor(fc, "your_field") as cursor:
        for row in cursor:
            if row[0] == 0:
                row[0] = 100
            cursor.updateRow(row)
    

