Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Change Nulls to Blanks

$
0
0
I need to change Nulls(<Null>) to Blanks("") for a field in an attribute table. The field is a string named RMS.

Code:

fieldList = arcpy.ListFields(fc, "", "String")
        for field in fieldList:
                updateRows = arcpy.da.UpdateCursor(fc, RMS + " IS NULL", "", RMS)
        for updateRow in updateRows:
                updateRow.setValue(RMS, "")
                updateRows.updateRow(updateRow)
        del row, cursor


Viewing all articles
Browse latest Browse all 2485

Trending Articles