TableToArrowTable

Zusammenfassung

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

Diskussion

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

Syntax

TableToArrowTable (in_table)
ParameterErläuterungDatentyp
in_table

Die Feature-Class, der Layer, die Tabelle oder die Tabellensicht

String
Rückgabewert
DatentypErläuterung
PyArrowTable

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

Codebeispiel

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)

Verwandte Themen