Uses of Class
ai.rapids.cudf.Scalar
Packages that use Scalar
-
Uses of Scalar in ai.rapids.cudf
Methods in ai.rapids.cudf that return ScalarModifier and TypeMethodDescriptionColumnView.all()
Returns a boolean scalar that is true if all of the elements in the column are true or non-zero otherwise false.Deprecated.the only output type supported is BOOL8.ColumnView.any()
Returns a boolean scalar that is true if any of the elements in the column are true or non-zero otherwise false.Returns a scalar is true or 1, depending on the specified type, if any of the elements in the column are true or non-zero otherwise false or 0.static Scalar
Scalar.durationDaysFromInt
(int value) Returns a DURATION_DAYS scalarstatic Scalar
Scalar.durationDaysFromInt
(Integer value) Returns a DURATION_DAYS scalarstatic Scalar
Scalar.durationFromLong
(DType type, long value) Returns a duration scalar based on the type parameter.static Scalar
Scalar.durationFromLong
(DType type, Long value) Returns a duration scalar based on the type parameter.static Scalar
Scalar.fromBool
(boolean value) static Scalar
static Scalar
Scalar.fromByte
(byte value) static Scalar
static Scalar
Scalar.fromDecimal
(int scale, int unscaledValue) static Scalar
Scalar.fromDecimal
(int scale, long unscaledValue) static Scalar
Scalar.fromDecimal
(int scale, BigInteger unscaledValue) static Scalar
Scalar.fromDecimal
(BigDecimal value) static Scalar
Scalar.fromDecimal
(BigInteger unscaledValue, DType dt) static Scalar
Scalar.fromDouble
(double value) static Scalar
Scalar.fromDouble
(Double value) static Scalar
Scalar.fromFloat
(float value) static Scalar
static Scalar
Scalar.fromInt
(int value) static Scalar
static Scalar
Scalar.fromLong
(long value) static Scalar
static Scalar
static Scalar
Scalar.fromShort
(short value) static Scalar
static Scalar
Scalar.fromString
(String value) static Scalar
Scalar.fromUnsignedByte
(byte value) static Scalar
Scalar.fromUnsignedByte
(Byte value) static Scalar
Scalar.fromUnsignedInt
(int value) static Scalar
Scalar.fromUnsignedInt
(Integer value) static Scalar
Scalar.fromUnsignedLong
(long value) static Scalar
Scalar.fromUnsignedLong
(Long value) static Scalar
Scalar.fromUnsignedShort
(short value) static Scalar
Scalar.fromUnsignedShort
(Short value) static Scalar
Scalar.fromUTF8String
(byte[] value) Creates a String scalar from an array of UTF8 bytes.final Scalar
ColumnView.getScalarElement
(int index) Get a single item from the column at the specified index as a Scalar.Scalar.incRefCount()
Increment the reference count for this scalar.static Scalar
Scalar.listFromColumnView
(ColumnView list) Creates a scalar of list from a ColumnView.static Scalar
Scalar.listFromNull
(HostColumnVector.DataType elementType) Creates a null scalar of list type.ColumnView.max()
Returns the maximum of all values in the column, returning a scalar of the same type as this column.Deprecated.the max reduction no longer internally allows for setting the output type, as a work around this API will cast the input type to the output type for you, but this may not work in all cases.ColumnView.mean()
Returns the arithmetic mean of all values in the column, returning a FLOAT64 scalar unless the column type is FLOAT32 then a FLOAT32 scalar is returned.Returns the arithmetic mean of all values in the column, returning a scalar of the specified type.ColumnView.min()
Returns the minimum of all values in the column, returning a scalar of the same type as this column.Deprecated.the min reduction no longer internally allows for setting the output type, as a work around this API will cast the input type to the output type for you, but this may not work in all cases.ColumnView.product()
Returns the product of all values in the column, returning a scalar of the same type as this column.Returns the product of all values in the column, returning a scalar of the specified type.ColumnView.reduce
(ReductionAggregation aggregation) Computes the reduction of the values in all rows of a column.ColumnView.reduce
(ReductionAggregation aggregation, DType outType) Computes the reduction of the values in all rows of a column.Scalar.repeatString
(int repeatTimes) Repeat the given string scalar a number of times specified by therepeatTimes
parameter.ColumnView.standardDeviation()
Returns the sample standard deviation of all values in the column, returning a FLOAT64 scalar unless the column type is FLOAT32 then a FLOAT32 scalar is returned.ColumnView.standardDeviation
(DType outType) Returns the sample standard deviation of all values in the column, returning a scalar of the specified type.static Scalar
Scalar.structFromColumnViews
(ColumnView... columns) Creates a scalar of struct from a ColumnView.static Scalar
Scalar.structFromNull
(HostColumnVector.DataType... elementTypes) Creates a null scalar of struct type.ColumnView.sum()
Computes the sum of all values in the column, returning a scalar of the same type as this column.Computes the sum of all values in the column, returning a scalar of the specified type.ColumnView.sumOfSquares()
Returns the sum of squares of all values in the column, returning a scalar of the same type as this column.ColumnView.sumOfSquares
(DType outType) Returns the sum of squares of all values in the column, returning a scalar of the specified type.static Scalar
Scalar.timestampDaysFromInt
(int value) static Scalar
Scalar.timestampDaysFromInt
(Integer value) static Scalar
Scalar.timestampFromLong
(DType type, long value) static Scalar
Scalar.timestampFromLong
(DType type, Long value) ColumnView.variance()
Returns the variance of all values in the column, returning a FLOAT64 scalar unless the column type is FLOAT32 then a FLOAT32 scalar is returned.Returns the variance of all values in the column, returning a scalar of the specified type.Methods in ai.rapids.cudf with parameters of type ScalarModifier and TypeMethodDescriptionfinal ColumnVector
ColumnView.addCalendricalMonths
(Scalar months) Add the specified number of months to the timestamp.final ColumnVector
ColumnView.capitalize
(Scalar delimiters) Returns a column of capitalized strings.final ColumnVector
Replaces values less than `lo` in `input` with `lo`, and values greater than `hi` with `hi`.final ColumnVector
Replaces values less than `lo` in `input` with `lo_replace`, and values greater than `hi` with `hi_replace`.boolean
Find if the `needle` is present in this col example: Single Column: idx 0 1 2 3 4 col = { 10, 20, 20, 30, 50 } Scalar: value = { 20 } result = truefinal ColumnVector
Checks if each string in a column ends with a specified comparison string, resulting in a parallel column of the boolean results.Set the relative number following the current row for range windowstatic ColumnVector
ColumnVector.fromScalar
(Scalar scalar, int rows) Create a new vector of length rows, where each row is filled with the Scalar's valuefinal ColumnVector
ColumnView.getJSONObject
(Scalar path) Apply a JSONPath string to all rows in an input strings column.final ColumnVector
ColumnView.getJSONObject
(Scalar path, GetJsonObjectOptions options) Apply a JSONPath string to all rows in an input strings column.final ColumnVector
ColumnView.getMapKeyExistence
(Scalar key) For a column of type List<Struct<String, String>> and a passed in String key, return a boolean column for all keys in the structs, It is true if the key exists in the corresponding map for that row, false otherwise.final ColumnVector
ColumnView.getMapValue
(Scalar key) Given a column of type List<Struct<X, Y>> and a key of type X, return a column of type Y, where each row in the output column is the Y value corresponding to the X key.final ColumnVector
ColumnView.ifElse
(ColumnView trueValues, Scalar falseValue) For a BOOL8 vector, computes a vector whose rows are selected from two other inputs based on the boolean value of this vector in the corresponding row.final ColumnVector
ColumnView.ifElse
(Scalar trueValue, ColumnView falseValues) For a BOOL8 vector, computes a vector whose rows are selected from two other inputs based on the boolean value of this vector in the corresponding row.final ColumnVector
For a BOOL8 vector, computes a vector whose rows are selected from two other inputs based on the boolean value of this vector in the corresponding row.final ColumnVector
ColumnView.joinStrings
(Scalar separator, Scalar narep) Concatenates all strings in the column into one new string delimited by an optional separator string.final ColumnVector
Returns a boolean ColumnVector identifying rows which match the given like pattern.final ColumnVector
ColumnView.listContains
(Scalar key) Create a column of bool values indicating whether the specified scalar is an element of each row of a list column.final ColumnVector
ColumnView.listIndexOf
(Scalar key, ColumnView.FindOptions findOption) Create a column of int32 indices, indicating the position of the scalar search key in each list row.final ColumnVector
Removes the specified characters from the beginning of each string.Set the relative number preceding the current row for range windowfinal ColumnVector
ColumnView.replaceNulls
(Scalar scalar) Returns a ColumnVector with any null values replaced with a scalar.final ColumnVector
ColumnView.replaceRegex
(RegexProgram regexProg, Scalar repl) For each string, replaces any character sequence matching the given regex program pattern using the replacement string scalar.final ColumnVector
ColumnView.replaceRegex
(RegexProgram regexProg, Scalar repl, int maxRepl) For each string, replaces any character sequence matching the given regex program pattern using the replacement string scalar.final ColumnVector
ColumnView.replaceRegex
(String pattern, Scalar repl) Deprecated.final ColumnVector
ColumnView.replaceRegex
(String pattern, Scalar repl, int maxRepl) Deprecated.final ColumnVector
Removes the specified characters from the end of each string.static Table
Table.scatter
(Scalar[] source, ColumnView scatterMap, Table target) Scatters values from the source rows into the target table out-of-place, returning a new result table.static ColumnVector
Create a new vector of length rows, starting at the initialValue and going by 1 each time.static ColumnVector
Create a new vector of length rows, starting at the initialValue and going by step each time.final ColumnVector
ColumnView.startsWith
(Scalar pattern) Checks if each string in a column starts with a specified comparison string, resulting in a parallel column of the boolean results.static ColumnVector
ColumnVector.stringConcatenate
(ColumnView[] columns, ColumnView sepCol, Scalar separatorNarep, Scalar colNarep, boolean separateNulls) Concatenate columns of strings together using a separator specified for each row and returns the result as a string column.static ColumnVector
ColumnVector.stringConcatenate
(Scalar separator, Scalar narep, ColumnView[] columns) Concatenate columns of strings together, combining a corresponding row from each column into a single string row of a new column.static ColumnVector
ColumnVector.stringConcatenate
(Scalar separator, Scalar narep, ColumnView[] columns, boolean separateNulls) Concatenate columns of strings together, combining a corresponding row from each column into a single string row of a new column.final ColumnVector
ColumnView.stringConcatenateListElements
(ColumnView sepCol, Scalar separatorNarep, Scalar stringNarep, boolean separateNulls, boolean emptyStringOutputIfEmptyList) Given a lists column of strings (each row is a list of strings), concatenates the strings within each row and returns a single strings column result.final ColumnVector
ColumnView.stringConcatenateListElements
(Scalar separator, Scalar narep, boolean separateNulls, boolean emptyStringOutputIfEmptyList) Given a lists column of strings (each row is a list of strings), concatenates the strings within each row and returns a single strings column result.final ColumnVector
ColumnView.stringContains
(Scalar compString) Checks if each string in a column contains a specified comparison string, resulting in a parallel column of the boolean results.final ColumnVector
ColumnView.stringLocate
(Scalar substring) Locates the starting index of the first instance of the given string in each row of a column.final ColumnVector
ColumnView.stringLocate
(Scalar substring, int start) Locates the starting index of the first instance of the given string in each row of a column.final ColumnVector
ColumnView.stringLocate
(Scalar substring, int start, int end) Locates the starting index of the first instance of the given string in each row of a column.final ColumnVector
ColumnView.stringReplace
(Scalar target, Scalar replace) Returns a new strings column where target string within each string is replaced with the specified replacement string.final ColumnVector
Removes the specified characters from the beginning and end of each string.Set the size of the range window.