import { MemoryResource } from '@rapidsai/rmm'; import { Column } from '../column'; import { DataFrame } from '../data_frame'; import { GroupByBaseProps } from '../groupby'; import { Table } from '../table'; import { DataType, Int32, List, Struct } from '../types/dtypes'; import { Interpolation, TypeMap } from '../types/mappings'; import { GroupByBase } from './base'; export interface GroupByMultipleProps extends GroupByBaseProps { by: R[]; index_key: IndexKey; } export declare class GroupByMultiple extends GroupByBase { private index_key; constructor(obj: DataFrame, props: GroupByMultipleProps); protected prepare_results(results: { keys: Table; cols: Column[]; }): DataFrame<{ [P in IndexKey | (string & Exclude)]: ({ [P_1 in IndexKey]: Struct<{ [P_2 in keyof Pick]: Pick[P_2]; }>; } & Omit)[P]; }>; /** * Compute the index of the maximum value in each group * * @param memoryResource The optional MemoryResource used to allocate the result's device memory. */ argmax(memoryResource?: MemoryResource): DataFrame<{ [P in IndexKey | (string & Exclude)]: ({ [P_1 in IndexKey]: Struct<{ [P_3 in keyof Pick<{ [P_2 in keyof T]: P_2 extends R ? T[P_2] : Int32; }, R>]: Pick<{ [P_2 in keyof T]: P_2 extends R ? T[P_2] : Int32; }, R>[P_3]; }>; } & Omit<{ [P_2 in keyof T]: P_2 extends R ? T[P_2] : Int32; }, R>)[P]; }>; /** * Compute the index of the minimum value in each group * * @param memoryResource The optional MemoryResource used to allocate the result's device memory. */ argmin(memoryResource?: MemoryResource): DataFrame<{ [P in IndexKey | (string & Exclude)]: ({ [P_1 in IndexKey]: Struct<{ [P_3 in keyof Pick<{ [P_2 in keyof T]: P_2 extends R ? T[P_2] : Int32; }, R>]: Pick<{ [P_2 in keyof T]: P_2 extends R ? T[P_2] : Int32; }, R>[P_3]; }>; } & Omit<{ [P_2 in keyof T]: P_2 extends R ? T[P_2] : Int32; }, R>)[P]; }>; /** * Compute the size of each group * * @param memoryResource The optional MemoryResource used to allocate the result's device memory. */ count(memoryResource?: MemoryResource): DataFrame<{ [P in IndexKey | (string & Exclude)]: ({ [P_1 in IndexKey]: Struct<{ [P_3 in keyof Pick<{ [P_2 in keyof T]: P_2 extends R ? T[P_2] : Int32; }, R>]: Pick<{ [P_2 in keyof T]: P_2 extends R ? T[P_2] : Int32; }, R>[P_3]; }>; } & Omit<{ [P_2 in keyof T]: P_2 extends R ? T[P_2] : Int32; }, R>)[P]; }>; /** * Compute the maximum value in each group * * @param memoryResource The optional MemoryResource used to allocate the result's device memory. */ max(memoryResource?: MemoryResource): DataFrame<{ [P in IndexKey | (string & Exclude)]: ({ [P_1 in IndexKey]: Struct<{ [P_2 in keyof Pick]: Pick[P_2]; }>; } & Omit)[P]; }>; /** * Compute the average value each group * * @param memoryResource The optional MemoryResource used to allocate the result's device memory. */ mean(memoryResource?: MemoryResource): DataFrame<{ [P in IndexKey | (string & Exclude)]: ({ [P_1 in IndexKey]: Struct<{ [P_2 in keyof Pick]: Pick[P_2]; }>; } & Omit)[P]; }>; /** * Compute the median value in each group * * @param memoryResource The optional MemoryResource used to allocate the result's device memory. */ median(memoryResource?: MemoryResource): DataFrame<{ [P in IndexKey | (string & Exclude)]: ({ [P_1 in IndexKey]: Struct<{ [P_2 in keyof Pick]: Pick[P_2]; }>; } & Omit)[P]; }>; /** * Compute the minimum value in each group * * @param memoryResource The optional MemoryResource used to allocate the result's device memory. */ min(memoryResource?: MemoryResource): DataFrame<{ [P in IndexKey | (string & Exclude)]: ({ [P_1 in IndexKey]: Struct<{ [P_2 in keyof Pick]: Pick[P_2]; }>; } & Omit)[P]; }>; /** * Return the nth value from each group * * @param n the index of the element to return * @param {boolean} [include_nulls=true] Whether to include/exclude nulls in list elements. * @param memoryResource The optional MemoryResource used to allocate the result's device memory. */ nth(n: number, include_nulls?: boolean, memoryResource?: MemoryResource): DataFrame<{ [P in IndexKey | (string & Exclude)]: ({ [P_1 in IndexKey]: Struct<{ [P_2 in keyof Pick]: Pick[P_2]; }>; } & Omit)[P]; }>; /** * Compute the number of unique values in each group * * @param {boolean} [include_nulls=false] Whether to include/exclude nulls in list elements. * @param memoryResource The optional MemoryResource used to allocate the result's device memory. */ nunique(include_nulls?: boolean, memoryResource?: MemoryResource): DataFrame<{ [P in IndexKey | (string & Exclude)]: ({ [P_1 in IndexKey]: Struct<{ [P_3 in keyof Pick<{ [P_2 in keyof T]: P_2 extends R ? T[P_2] : Int32; }, R>]: Pick<{ [P_2 in keyof T]: P_2 extends R ? T[P_2] : Int32; }, R>[P_3]; }>; } & Omit<{ [P_2 in keyof T]: P_2 extends R ? T[P_2] : Int32; }, R>)[P]; }>; /** * Compute the standard deviation for each group * * @param {number} [ddof=1] Delta Degrees of Freedom. The divisor used in calculations is N - * ddof, where N represents the number of elements in each group. * @param memoryResource The optional MemoryResource used to allocate the result's device memory. */ std(ddof?: number, memoryResource?: MemoryResource): DataFrame<{ [P in IndexKey | (string & Exclude)]: ({ [P_1 in IndexKey]: Struct<{ [P_2 in keyof Pick]: Pick[P_2]; }>; } & Omit)[P]; }>; /** * Compute the sum of values in each group * * @param memoryResource The optional MemoryResource used to allocate the result's device memory. */ sum(memoryResource?: MemoryResource): DataFrame<{ [P in IndexKey | (string & Exclude)]: ({ [P_1 in IndexKey]: Struct<{ [P_2 in keyof Pick]: Pick[P_2]; }>; } & Omit)[P]; }>; /** * Compute the variance for each group * * @param {number} [ddof=1] Delta Degrees of Freedom. The divisor used in calculations is N - * ddof, where N represents the number of elements in each group. * @param memoryResource The optional MemoryResource used to allocate the result's device memory. */ var(ddof?: number, memoryResource?: MemoryResource): DataFrame<{ [P in IndexKey | (string & Exclude)]: ({ [P_1 in IndexKey]: Struct<{ [P_2 in keyof Pick]: Pick[P_2]; }>; } & Omit)[P]; }>; /** * Return values at the given quantile. * * @param q the quantile to compute, 0 <= q <= 1 * @param interpolation This optional parameter specifies the interpolation method to use, * when the desired quantile lies between two data points i and j. * @param memoryResource The optional MemoryResource used to allocate the result's device memory. */ quantile(q?: number, interpolation?: keyof typeof Interpolation, memoryResource?: MemoryResource): DataFrame<{ [P in IndexKey | (string & Exclude)]: ({ [P_1 in IndexKey]: Struct<{ [P_2 in keyof Pick]: Pick[P_2]; }>; } & Omit)[P]; }>; /** * Returns a list column of all included elements in the group. * * @param {boolean} [include_nulls=true] Whether to include/exclude nulls in list elements. * @param memoryResource The optional MemoryResource used to allocate the result's device memory. */ collectList(include_nulls?: boolean, memoryResource?: MemoryResource): DataFrame<{ [P in IndexKey | (string & Exclude)]: ({ [P_1 in IndexKey]: Struct<{ [P_3 in keyof Pick<{ [P_2 in keyof T]: P_2 extends R ? T[P_2] : List; }, R>]: Pick<{ [P_2 in keyof T]: P_2 extends R ? T[P_2] : List; }, R>[P_3]; }>; } & Omit<{ [P_2 in keyof T]: P_2 extends R ? T[P_2] : List; }, R>)[P]; }>; /** * Returns a lists column of all included elements in the group/series. Within each list, the * duplicated entries are dropped out such that each entry appears only once. * * @param {boolean} [include_nulls=true] Whether to include/exclude nulls in list elements. * @param {boolean} [nulls_equal=true] Whether null entries within each list should be considered * equal. * @param {boolean} [nans_equal=false] Whether `NaN` values in floating point column should be * considered equal. * @param memoryResource The optional MemoryResource used to allocate the result's device memory. */ collectSet(include_nulls?: boolean, nulls_equal?: boolean, nans_equal?: boolean, memoryResource?: MemoryResource): DataFrame<{ [P in IndexKey | (string & Exclude)]: ({ [P_1 in IndexKey]: Struct<{ [P_3 in keyof Pick<{ [P_2 in keyof T]: P_2 extends R ? T[P_2] : List; }, R>]: Pick<{ [P_2 in keyof T]: P_2 extends R ? T[P_2] : List; }, R>[P_3]; }>; } & Omit<{ [P_2 in keyof T]: P_2 extends R ? T[P_2] : List; }, R>)[P]; }>; } //# sourceMappingURL=multiple.d.ts.map