ArcGIS Pro 2.7 API Reference Guide
CalculateStatistics Method

ArcGIS.Core.Data Namespace > Table Class : CalculateStatistics Method
Specifies how statistics computations should be carried out against one or more fields in a table or feature class.
Performs common statistics functions on one or more fields in this table or feature class. This method must be called on the MCT. Use QueuedTask.Run.
Syntax

Parameters

tableStatisticsDescription
Specifies how statistics computations should be carried out against one or more fields in a table or feature class.

Return Value

A list of TableStatisticsResults that report the results of statistics computation on the input fields. If no GroupBy is specified, the count of the returned list is one. However, if tableStatisticsDescription has at least one GroupBy field specified, the returned list count may be more than one where each instance of TableStatisticsResult corresponds to each unique value under the GroupBy field.
Exceptions
ExceptionDescription
tableStatisticsDescription is null.
One or more StatisticsDescriptions in tableStatisticsDescription's StatisticsDescriptions property have a Field that does not exist in this Table.
A geodatabase-related exception has occurred.
Remarks
Depending on the capability of the underlying data store, not all configuration options are supported. For example, TableStatisticsDescription.GroupBy is not implemented for shapefiles.
Requirements

Target Platforms: Windows 10, Windows 8.1

See Also

Reference

Table Class
Table Members