da_insert: Table Insertion with arcpy.da

Description Usage Arguments Value Examples

Description

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

Usage

1
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

1
2
3
4
5
6
7
8
9
## Not run: 
layer = "path/to/table"
fields = c("VALUE", "NOTE")
d = da_read(layer, fields)
add.d = data.frame(VALUE = 5, NOTE = "NEW",
  stringsAsFactors = FALSE)
da_insert(layer, add.d)

## End(Not run)

mkoohafkan/arcpy documentation built on May 27, 2019, 2:09 p.m.