Résumé
Converts a table or feature class to an Apache Arrow table.
Discussion
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.
Syntaxe
TableToArrowTable (in_table)
Paramètre | Explication | Type de données |
in_table | Classe d'entités, couche, table ou vue tabulaire. | String |
Type de données | Explication |
PyArrowTable | The output pyarrow.Table. See the pyarrow.Table object API. |
Exemple de code
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)
Rubriques connexes
Vous avez un commentaire à formuler concernant cette rubrique ?