Drop records from a table (e.g. attribute table of a layer) with the arcpy.da module.

da_drop(table.path, rows)

Arguments

table.path

The file path to the table.

rows

The row indexes to drop.

Value

(Invisible) The path to the table, i.e. table.path.

Examples

if (FALSE) { # \dontrun{
arcpy$env$workspace = tempdir()
arcpy$env$scratchWorkspace = tempdir()
fc = arcpy$management$CopyFeatures(system.file("CA_Counties",
  "CA_Counties_TIGER2016.shp", package = "arcpy"), "CA_Counties")
d = da_read(fc, c("STATEFP", "COUNTYFP"))
drop.rows = which(d$STATEFP == "06" & d$COUNTYFP == "067")
da_drop(fc, drop.rows)
} # }