ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Ayuda
  • Sign Out
ArcGIS Desktop

ArcGIS Online

La plataforma de representación cartográfica para tu organización

ArcGIS Desktop

Un completo SIG profesional

ArcGIS Enterprise

SIG en tu empresa

ArcGIS Developers

Herramientas para crear aplicaciones basadas en la ubicación

ArcGIS Solutions

Plantillas de aplicaciones y mapas gratuitas para tu sector

ArcGIS Marketplace

Obtén aplicaciones y datos para tu organización.

  • Documentación
  • Soporte
Esri
  • Iniciar sesión
user
  • Mi perfil
  • Cerrar sesión

ArcMap

  • Inicio
  • Introducción
  • Cartografiar
  • Analizar
  • Administrar datos
  • Herramientas
  • Extensiones

ExtendTable

  • Resumen
  • Debate
  • Sintaxis
  • Muestra de código

Resumen

Joins the contents of a NumPy structured array to a table based on a common attribute field. The input table is updated to contain the fields from the join table.

Debate

The records in the in_array are matched to the records in the in_table. A match is made when the table_match_field and array_match_table values are equal. The join is permanent.

NumPy is a fundamental package for scientific computing in Python, including support for a powerful N-dimensional array object. For more information, see Working with NumPy in ArcGIS.

Sintaxis

ExtendTable (in_table, table_match_field, in_array, array_match_field, {append_only})
ParámetroExplicaciónTipo de datos
in_table

The target table to which fields from a NumPy array will be appended.

String
table_match_field

Field name from in_table to use as a match to the array.

String
in_array

NumPy structured array to be appended to in_table.

Matching in_array field values must be unique.

NumPyArray
array_match_field

Field name from in_array to use to match.

String
append_only

Controls how fields are added or updated in the existing table.

If True, fields will be appended to the existing table only. If any of NumPy field names exist already in the in_table, ExtendTable will fail.

If False, existing fields will be updated if they share a common field name with fields in the NumPy array. Any matching fields must have a compatible field type. For example, a NumPy string field cannot be appended into a numeric field.

(El valor predeterminado es True)

Boolean

Muestra de código

Use ExtendTable to join a NumPy array to an existing table.

import arcpy
import numpy

# numpy array
#
array = numpy.array([(1, 'a', 1111.0), (2, 'b', 2222.22)],
                    numpy.dtype([('idfield',numpy.int32),
                                 ('textfield', '|S256'),
                                 ('doublefield','<f8')]))

# Append the array to an existing table
#
arcpy.da.ExtendTable("c:/data/base.gdb/current_table", 
                     "tableid", 
                     array, 
                     "idfield")

Temas relacionados

  • Trabajar con NumPy en ArcGIS
  • NumPyArrayToFeatureClass
  • NumPyArrayToTable
  • FeatureClassToNumPyArray
  • TableToNumPyArray

ArcGIS Desktop

  • Inicio
  • Documentación
  • Soporte

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

Acerca de Esri

  • Quiénes somos
  • Empleo
  • Blog de Esri
  • Conferencia de usuarios
  • Cumbre de desarrolladores
Esri
Díganos su opinión.
Copyright © 2021 Esri. | Privacidad | Legal