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

da_insert(table.path, d)

Arguments

table.path

The file path to the table.

d

The data to write to table.path, with the same number of rows as the table. Column names must match field names of the table.

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("ALAND", "CLASSFP"))
add.d = data.frame(ALAND= 1e4, CLASSFP = "H2",
  stringsAsFactors = FALSE)
da_insert(fc, add.d)
} # }