聚合#
- class pylibcudf.aggregation.Aggregation#
要执行的聚合类型。
聚合被传递给诸如
aggregate()
之类的 API,以指示要执行的操作。使用类表示聚合为处理可参数化的聚合提供了一个统一的 API。此类不应直接实例化,只能通过工厂函数之一实例化。详细信息请参阅
cudf::aggregation
。方法
kind
(self)获取聚合的类型。
- kind(self)#
获取聚合的类型。
- pylibcudf.aggregation.CorrelationType#
另请参阅
cudf::correlation_type
。枚举成员
PEARSON
KENDALL
SPEARMAN
- pylibcudf.aggregation.EWMHistory#
另请参阅
cudf::ewm_history
。枚举成员
INFINITE
FINITE
- pylibcudf.aggregation.Kind(*values)#
枚举成员
SUM
PRODUCT
MIN
MAX
COUNT_VALID
COUNT_ALL
ANY
ALL
SUM_OF_SQUARES
MEAN
M2
VARIANCE
STD
MEDIAN
QUANTILE
ARGMAX
ARGMIN
NUNIQUE
NTH_ELEMENT
ROW_NUMBER
EWMA
RANK
COLLECT_LIST
COLLECT_SET
LEAD
LAG
PTX
CUDA
HOST_UDF
MERGE_LISTS
MERGE_SETS
MERGE_M2
COVARIANCE
CORRELATION
TDIGEST
MERGE_TDIGEST
HISTOGRAM
MERGE_HISTOGRAM
- pylibcudf.aggregation.RankMethod#
另请参阅
cudf::rank_method
。枚举成员
FIRST
AVERAGE
MIN
MAX
DENSE
- pylibcudf.aggregation.RankPercentage#
另请参阅
cudf::rank_percentage
。枚举成员
NONE
ZERO_NORMALIZED
ONE_NORMALIZED
- pylibcudf.aggregation.UdfType#
另请参阅
cudf::udf_type
。枚举成员
CUDA
PTX
- pylibcudf.aggregation.all() Aggregation #
创建一个 all 聚合。
详细信息请参阅
make_all_aggregation()
。- 返回:
- Aggregation
all 聚合。
- pylibcudf.aggregation.any() Aggregation #
创建一个 any 聚合。
详细信息请参阅
make_any_aggregation()
。- 返回:
- Aggregation
any 聚合。
- pylibcudf.aggregation.argmax() Aggregation #
创建一个 argmax 聚合。
详细信息请参阅
make_argmax_aggregation()
。- 返回:
- Aggregation
argmax 聚合。
- pylibcudf.aggregation.argmin() Aggregation #
创建一个 argmin 聚合。
详细信息请参阅
make_argmin_aggregation()
。- 返回:
- Aggregation
argmin 聚合。
- pylibcudf.aggregation.collect_list(null_policy null_handling=null_policy.INCLUDE) Aggregation #
创建一个 collect_list 聚合。
详细信息请参阅
make_collect_list_aggregation()
。- 参数:
- null_handlingnull_policy,默认为 INCLUDE
是否应包含空值。
- 返回:
- Aggregation
collect_list 聚合。
- pylibcudf.aggregation.collect_set(null_handling=null_policy.INCLUDE, nulls_equal=null_equality.EQUAL, nans_equal=nan_equality.ALL_EQUAL) Aggregation #
创建一个 collect_set 聚合。
详细信息请参阅
make_collect_set_aggregation()
。- 参数:
- null_handlingnull_policy,默认为 INCLUDE
是否应包含空值。
- nulls_equalnull_equality,默认为 EQUAL
空值是否应被视为相等。
- nans_equalnan_equality,默认为 ALL_EQUAL
NaN 值是否应被视为相等。
- 返回:
- Aggregation
collect_set 聚合。
- pylibcudf.aggregation.correlation(correlation_type type, size_type min_periods) Aggregation #
创建一个 correlation 聚合。
详细信息请参阅
make_correlation_aggregation()
。- 参数:
- typecorrelation_type
要计算的相关性类型。
- min_periodsint
计算相关性时考虑的最小观察次数。
- 返回:
- Aggregation
correlation 聚合。
- pylibcudf.aggregation.count(null_policy null_handling=null_policy.EXCLUDE) Aggregation #
创建一个 count 聚合。
详细信息请参阅
make_count_aggregation()
。- 参数:
- null_handlingnull_policy,默认为 EXCLUDE
是否应包含空值。
- 返回:
- Aggregation
count 聚合。
- pylibcudf.aggregation.covariance(size_type min_periods, size_type ddof) Aggregation #
创建一个 covariance 聚合。
详细信息请参阅
make_covariance_aggregation()
。- 参数:
- min_periodsint
计算协方差时考虑的最小观察次数。
- ddofint
自由度的差值。
- 返回:
- Aggregation
covariance 聚合。
- pylibcudf.aggregation.ewma(float center_of_mass, ewm_history history) Aggregation #
创建一个 EWMA 聚合。
详细信息请参阅
make_ewma_aggregation()
。- 参数:
- center_of_massfloat
质量中心表示的衰减度
- historyewm_history
是否将历史视为无限。
- 返回:
- Aggregation
EWMA 聚合。
- pylibcudf.aggregation.histogram() Aggregation #
创建一个 histogram 聚合。
详细信息请参阅
make_histogram_aggregation()
。- 返回:
- Aggregation
histogram 聚合。
- pylibcudf.aggregation.m2() Aggregation #
创建一个 M2 聚合。
详细信息请参阅
make_m2_aggregation()
。- 返回:
- Aggregation
M2 聚合。
- pylibcudf.aggregation.max() Aggregation #
创建一个 max 聚合。
详细信息请参阅
make_max_aggregation()
。- 返回:
- Aggregation
max 聚合。
- pylibcudf.aggregation.mean() Aggregation #
创建一个 mean 聚合。
详细信息请参阅
make_mean_aggregation()
。- 返回:
- Aggregation
mean 聚合。
- pylibcudf.aggregation.median() Aggregation #
创建一个 median 聚合。
详细信息请参阅
make_median_aggregation()
。- 返回:
- Aggregation
median 聚合。
- pylibcudf.aggregation.merge_histogram() Aggregation #
创建一个 merge histogram 聚合。
详细信息请参阅
make_merge_histogram_aggregation()
。- 返回:
- Aggregation
merge histogram 聚合。
- pylibcudf.aggregation.merge_lists() Aggregation #
创建一个 merge lists 聚合。
详细信息请参阅
make_merge_lists_aggregation()
。- 返回:
- Aggregation
merge lists 聚合。
- pylibcudf.aggregation.merge_m2() Aggregation #
创建一个 merge M2 聚合。
详细信息请参阅
make_merge_m2_aggregation()
。- 返回:
- Aggregation
merge M2 聚合。
- pylibcudf.aggregation.merge_sets(null_equality nulls_equal=null_equality.EQUAL, nan_equality nans_equal=nan_equality.ALL_EQUAL) Aggregation #
创建一个 merge sets 聚合。
详细信息请参阅
make_merge_sets_aggregation()
。- 参数:
- nulls_equalnull_equality,默认为 EQUAL
空值是否应被视为相等。
- nans_equalnan_equality,默认为 ALL_EQUAL
NaN 值是否应被视为相等。
- 返回:
- Aggregation
merge sets 聚合。
- pylibcudf.aggregation.merge_tdigest(int max_centroids) Aggregation #
创建一个 merge TDIGEST 聚合。
详细信息请参阅
make_merge_tdigest_aggregation()
。- 参数:
- max_centroidsint
控制压缩级别和后续查询输出 tdigest 数据时精度的参数。
- 返回:
- Aggregation
merge TDIGEST 聚合。
- pylibcudf.aggregation.min() Aggregation #
创建一个 min 聚合。
详细信息请参阅
make_min_aggregation()
。- 返回:
- Aggregation
min 聚合。
- pylibcudf.aggregation.nth_element(size_type n, null_policy null_handling=null_policy.INCLUDE) Aggregation #
创建一个 nth_element 聚合。
详细信息请参阅
make_nth_element_aggregation()
。- 参数:
- null_handlingnull_policy,默认为 INCLUDE
是否应包含空值。
- 返回:
- Aggregation
nth_element 聚合。
- pylibcudf.aggregation.nunique(null_policy null_handling=null_policy.EXCLUDE) Aggregation #
创建一个 nunique 聚合。
详细信息请参阅
make_nunique_aggregation()
。- 参数:
- null_handlingnull_policy,默认为 EXCLUDE
是否应包含空值。
- 返回:
- Aggregation
nunique 聚合。
- pylibcudf.aggregation.product() Aggregation #
创建一个 product 聚合。
详细信息请参阅
make_product_aggregation()
。- 返回:
- Aggregation
product 聚合。
- pylibcudf.aggregation.quantile(list quantiles, interpolation interp=interpolation.LINEAR) Aggregation #
创建一个 quantile 聚合。
详细信息请参阅
make_quantile_aggregation()
。- 参数:
- quantileslist
要计算的分位数列表,应介于 0 和 1 之间。
- interpinterpolation,默认为 LINEAR
当所需分位数介于两个数据点之间时使用的插值技术。
- 返回:
- Aggregation
quantile 聚合。
- pylibcudf.aggregation.rank(rank_method method, order column_order=order.ASCENDING, null_policy null_handling=null_policy.EXCLUDE, null_order null_precedence=null_order.AFTER, rank_percentage percentage=rank_percentage.NONE) Aggregation #
创建一个 rank 聚合。
详细信息请参阅
make_rank_aggregation()
。- 参数:
- methodrank_method
用于排名的算法。
- column_orderorder,默认为 ASCENDING
对列进行排序的顺序。
- null_handlingnull_policy,默认为 EXCLUDE
是否应包含空值。
- null_precedencenull_order,默认为 AFTER
空值应位于非空值之前还是之后。
- percentagerank_percentage,默认为 NONE
排名是否应转换为百分比,如果应转换,则使用哪种归一化类型。
- 返回:
- Aggregation
rank 聚合。
- pylibcudf.aggregation.std(size_type ddof=1) Aggregation #
创建一个 std 聚合。
详细信息请参阅
make_std_aggregation()
。- 参数:
- ddofint,默认为 1
自由度的差值。默认值为 1。
- 返回:
- Aggregation
std 聚合。
- pylibcudf.aggregation.sum() Aggregation #
创建一个 sum 聚合。
详细信息请参阅
make_sum_aggregation()
。- 返回:
- Aggregation
sum 聚合。
- pylibcudf.aggregation.sum_of_squares() Aggregation #
创建一个 sum_of_squares 聚合。
详细信息请参阅
make_sum_of_squares_aggregation()
。- 返回:
- Aggregation
sum_of_squares 聚合。
- pylibcudf.aggregation.tdigest(int max_centroids) Aggregation #
创建一个 TDIGEST 聚合。
详细信息请参阅
make_tdigest_aggregation()
。- 参数:
- max_centroidsint
控制压缩级别和后续查询输出 tdigest 数据时精度的参数。
- 返回:
- Aggregation
TDIGEST 聚合。
- pylibcudf.aggregation.udf(unicode operation, DataType output_type) Aggregation #
创建一个 udf 聚合。
详细信息请参阅
make_udf_aggregation()
。- 参数:
- operationstr
要执行的操作,以 PTX 代码字符串表示。
- output_typeDataType
聚合的输出类型。
- 返回:
- Aggregation
udf 聚合。
- pylibcudf.aggregation.variance(size_type ddof=1) Aggregation #
创建一个 variance 聚合。
详细信息请参阅
make_variance_aggregation()
。- 参数:
- ddofint,默认为 1
自由度的差值。
- 返回:
- Aggregation
variance 聚合。