import { MemoryResource } from '@rapidsai/rmm'; import { Series } from '../series'; import { Categorical, DataType, Int16, Int32, Int64, Int8, Integral, Uint16, Uint32, Uint64, Uint8, Utf8String } from '../types/dtypes'; /** * A Series of dictionary-encoded values in GPU memory. */ export declare class CategoricalSeries extends Series> { /** * @summary The Series of codes. */ get codes(): import("./integral").Int32Series; /** * @summary The Series of categories. */ get categories(): Series; /** * @inheritdoc */ encodeLabels(_categories?: Series>, type?: R, _nullSentinel?: R['scalarType'], _memoryResource?: MemoryResource): Series; /** * @summary Get a value at the specified index to host memory * * @param index the index in this Series to return a value for * * @example * ```typescript * import {Series} from "@rapidsai/cudf"; * * // StringSeries * Series.new(["foo", "bar", "test"]).getValue(0) // "foo" * Series.new(["foo", "bar", "test"]).getValue(2) // "test" * Series.new(["foo", "bar", "test"]).getValue(3) // throws index out of bounds error * ``` */ getValue(index: number): T["scalarType"] | null; /** * @summary Set a value at the specified index. * * @param index the index in this Series to set a value for * @param value the value to set at `index` * * @example * ```typescript * import {Series} from "@rapidsai/cudf"; * * // StringSeries * const a = Series.new(["foo", "bar", "test"]) * a.setValue(2, "test1") // inplace update -> Series(["foo", "bar", "test1"]) * ``` */ setValue(index: number, value: T['scalarType']): void; _castAsInt8(memoryResource?: MemoryResource): Series; _castAsInt16(memoryResource?: MemoryResource): Series; _castAsInt32(memoryResource?: MemoryResource): Series; _castAsInt64(memoryResource?: MemoryResource): Series; _castAsUint8(memoryResource?: MemoryResource): Series; _castAsUint16(memoryResource?: MemoryResource): Series; _castAsUint32(memoryResource?: MemoryResource): Series; _castAsUint64(memoryResource?: MemoryResource): Series; _castAsString(memoryResource?: MemoryResource): Series; _castAsCategorical(type: R, memoryResource?: MemoryResource): Series; protected _castCategories(type: R, memoryResource?: MemoryResource): Series; /** * @summary Create a new CategoricalColumn with the categories set to the specified `categories`. * * @param categories The new categories * @param memoryResource The optional MemoryResource used to allocate the result Series's device * memory. * @returns CategoricalSeries of same size as the current Series with the new categories. */ setCategories(categories: Series | (T['scalarType'][]), memoryResource?: MemoryResource): Series>; } //# sourceMappingURL=categorical.d.ts.map