Crysda::DataCol
Abstract base struct for column types of Int32?, Int64?, Float64?, Bool?, String?, DataFrame? or Any type
Constructors
Instance methods
Calculates the cumulative sum of the column values.
An NA value in x causes the corresponding and following elements of the return value to be NA.
raises InvalidColumnOperationException If the type of the column is not numeric
See Object#hash(hasher)
Maps a column to true for NA values and false otherwise
Returns a Bool array with NA values marked as true, while others are marked as false
Maps a column to false for NA values and true otherwise
Returns a Bool array with NA values marked as false, while others are marked as true
Returns the "previous" column values. Useful for comparing values ahead of the current values. n - positive integer, giving the number of positions to lead by (defaults to 1)
Returns the "next" column values. Useful for comparing values ahead of the current values. n - positive integer, giving the number of positions to lead by (defaults to 1)
Match a text column in a NA-aware manner to create a predicate vector for filtering.
Calculates the maximum of the column values.
remove_na If true missing values will be excluded from the operation
raises MissingValueException if remove_na is false but the data contains missing values
raises InvalidColumnOperationException If the type of the column is not numeric
Calculates the arithmetic mean of the column values.
remove_na If true missing values will be excluded from the operation
raises MissingValueException if remove_na is false but the data contains missing values
raises InvalidColumnOperationException If the type of the column is not numeric
Calculates the median of the column values.
remove_na If true missing values will be excluded from the operation
raises MissingValueException if remove_na is false but the data contains missing values
raises InvalidColumnOperationException If the type of the column is not numeric
Calculates the minimum of the column values.
remove_na If true missing values will be excluded from the operation
raises MissingValueException if remove_na is false but the data contains missing values
raises InvalidColumnOperationException If the type of the column is not numeric
order returns the index each element would have in an ascending list
y = Float64Col.new("foo", [3.5, 3.0, 3.2, 3.1, 3.6, 3.9, 3.4, 3.4, 2.9, 3.1])
y.order # => [8, 1, 3, 9, 2, 6, 7, 0, 4, 5]
Calculates the percentage change between the current and a prior column value.
raises InvalidColumnOperationException If the type of the receiver column is not numeric
rank returns the order of each element in an ascending list
y = Float64Col.new("foo", [3.5, 3.0, 3.2, 3.1, 3.6, 3.9, 3.4, 3.4, 2.9, 3.1])
y.rank # => [7, 1, 4, 2, 8, 9, 5, 6, 0, 3]
Calculates the standard deviation of the column values.
remove_na If true missing values will be excluded from the operation
raises MissingValueException if remove_na is false but the data contains missing values
raises InvalidColumnOperationException If the type of the column is not numeric
Calculates the sum of the column values.
remove_na If true missing values will be excluded from the operation
raises MissingValueException if remove_na is false but the data contains missing values
raises InvalidColumnOperationException If the type of the column is not numeric
Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO) which can be overridden for custom implementations.
Also see #inspect.