TableToArrowTable

Resumen

Converts a table or feature class to an Apache Arrow table.

Debate

Apache Arrow is a standard cross-platform in-memory representation of columnar data. An Arrow table is a two-dimensional tabular representation in which columns are Arrow chunked arrays. The data types for the columns are determined by the field types of the input table or feature class, with support for types unique to ArcGIS Pro provided by Arrow extension types.

Geoprocessing tools that accept a table or feature class as input (and do not modify the input) will accept a PyArrow table as input. While a geoprocessing tool will accept an Arrow table as input, a tool will not output an Arrow table.

Learn more about Apache Arrow in ArcGIS

Sintaxis

TableToArrowTable (in_table)
ParámetroExplicaciónTipo de datos
in_table

La clase de entidad, capa, tabla o vista de tabla.

String
Valor de retorno
Tipo de datosExplicación
PyArrowTable

The output pyarrow.Table. See the pyarrow.Table object API.

Muestra de código

TableToArrowTable example

Convert a feature class to an Arrow table and count the number of counties in the dataset.

import arcpy

input = r'C:\data\usa.gdb\USA\counties'
arrow_table = arcpy.da.TableToArrowTable(input)

# Get the number of counties in the dataset
count = arcpy.management.GetCount(arrow_table)
print("Number of US Counties:", count)

Temas relacionados