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 ScalarScalar.durationDaysFromInt(int value) Returns a DURATION_DAYS scalarstatic ScalarScalar.durationDaysFromInt(Integer value) Returns a DURATION_DAYS scalarstatic ScalarScalar.durationFromLong(DType type, long value) Returns a duration scalar based on the type parameter.static ScalarScalar.durationFromLong(DType type, Long value) Returns a duration scalar based on the type parameter.static ScalarScalar.fromBool(boolean value) static Scalarstatic ScalarScalar.fromByte(byte value) static Scalarstatic ScalarScalar.fromDecimal(int scale, int unscaledValue) static ScalarScalar.fromDecimal(int scale, long unscaledValue) static ScalarScalar.fromDecimal(int scale, BigInteger unscaledValue) static ScalarScalar.fromDecimal(BigDecimal value) static ScalarScalar.fromDecimal(BigInteger unscaledValue, DType dt) static ScalarScalar.fromDouble(double value) static ScalarScalar.fromDouble(Double value) static ScalarScalar.fromFloat(float value) static Scalarstatic ScalarScalar.fromInt(int value) static Scalarstatic ScalarScalar.fromLong(long value) static Scalarstatic Scalarstatic ScalarScalar.fromShort(short value) static Scalarstatic ScalarScalar.fromString(String value) static ScalarScalar.fromUnsignedByte(byte value) static ScalarScalar.fromUnsignedByte(Byte value) static ScalarScalar.fromUnsignedInt(int value) static ScalarScalar.fromUnsignedInt(Integer value) static ScalarScalar.fromUnsignedLong(long value) static ScalarScalar.fromUnsignedLong(Long value) static ScalarScalar.fromUnsignedShort(short value) static ScalarScalar.fromUnsignedShort(Short value) static ScalarScalar.fromUTF8String(byte[] value) Creates a String scalar from an array of UTF8 bytes.final ScalarColumnView.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 ScalarScalar.listFromColumnView(ColumnView list) Creates a scalar of list from a ColumnView.static ScalarScalar.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 therepeatTimesparameter.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 ScalarScalar.structFromColumnViews(ColumnView... columns) Creates a scalar of struct from a ColumnView.static ScalarScalar.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 ScalarScalar.timestampDaysFromInt(int value) static ScalarScalar.timestampDaysFromInt(Integer value) static ScalarScalar.timestampFromLong(DType type, long value) static ScalarScalar.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 ColumnVectorColumnView.addCalendricalMonths(Scalar months) Add the specified number of months to the timestamp.final ColumnVectorColumnView.capitalize(Scalar delimiters) Returns a column of capitalized strings.final ColumnVectorReplaces values less than `lo` in `input` with `lo`, and values greater than `hi` with `hi`.final ColumnVectorReplaces values less than `lo` in `input` with `lo_replace`, and values greater than `hi` with `hi_replace`.booleanFind 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 ColumnVectorChecks 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 ColumnVectorColumnVector.fromScalar(Scalar scalar, int rows) Create a new vector of length rows, where each row is filled with the Scalar's valuefinal ColumnVectorColumnView.getJSONObject(Scalar path) Apply a JSONPath string to all rows in an input strings column.final ColumnVectorColumnView.getJSONObject(Scalar path, GetJsonObjectOptions options) Apply a JSONPath string to all rows in an input strings column.final ColumnVectorColumnView.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 ColumnVectorColumnView.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 ColumnVectorColumnView.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 ColumnVectorColumnView.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 ColumnVectorFor 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 ColumnVectorColumnView.joinStrings(Scalar separator, Scalar narep) Concatenates all strings in the column into one new string delimited by an optional separator string.final ColumnVectorReturns a boolean ColumnVector identifying rows which match the given like pattern.final ColumnVectorColumnView.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 ColumnVectorColumnView.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 ColumnVectorRemoves the specified characters from the beginning of each string.Set the relative number preceding the current row for range windowfinal ColumnVectorColumnView.replaceNulls(Scalar scalar) Returns a ColumnVector with any null values replaced with a scalar.final ColumnVectorColumnView.replaceRegex(RegexProgram regexProg, Scalar repl) For each string, replaces any character sequence matching the given regex program pattern using the replacement string scalar.final ColumnVectorColumnView.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 ColumnVectorColumnView.replaceRegex(String pattern, Scalar repl) Deprecated.final ColumnVectorColumnView.replaceRegex(String pattern, Scalar repl, int maxRepl) Deprecated.final ColumnVectorRemoves the specified characters from the end of each string.static TableTable.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 ColumnVectorCreate a new vector of length rows, starting at the initialValue and going by 1 each time.static ColumnVectorCreate a new vector of length rows, starting at the initialValue and going by step each time.final ColumnVectorColumnView.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 ColumnVectorColumnVector.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 ColumnVectorColumnVector.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 ColumnVectorColumnVector.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 ColumnVectorColumnView.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 ColumnVectorColumnView.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 ColumnVectorColumnView.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 ColumnVectorColumnView.stringLocate(Scalar substring) Locates the starting index of the first instance of the given string in each row of a column.final ColumnVectorColumnView.stringLocate(Scalar substring, int start) Locates the starting index of the first instance of the given string in each row of a column.final ColumnVectorColumnView.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 ColumnVectorColumnView.stringReplace(Scalar target, Scalar replace) Returns a new strings column where target string within each string is replaced with the specified replacement string.final ColumnVectorRemoves the specified characters from the beginning and end of each string.Set the size of the range window.