struct

Crysda::DataCol

Inherits Struct / Value / Object

Constructors

new(name : String)
Source

Instance methods

*(val : Number)
Source
*(val : DataCol)
Source
+(val : Number)
Source
+(val : DataCol)
Source
+(val : String)
Source
-(val : Number)
Source
-(val : DataCol)
Source
/(val : Number)
Source
/(val : DataCol)
Source
<(val : Any | DataCol)
Source
<=(val : Any | DataCol)
Source
==(i : Any)
Source
==(other : self)
>(val : Any | DataCol)
Source
>=(val : Any | DataCol)
Source
[](*args, **options)
Source
[](*args, **options, &)
Source
[]?(*args, **options)
Source
[]?(*args, **options, &)
Source
apply

Apply a function to each non-null value

Source
as_b
Source
as_f64
Source
as_i
Source
as_i64
Source
as_s
Source
between(min_val, max_val) : Array(Bool)

Check if numeric values are between min and max (inclusive)

Source
bfill

Backward fill nulls (propagate next valid value)

Source
clip(min_val, max_val) : DataCol

Clip values to a range

Source
clip_lower(min_val) : DataCol

Clip values to minimum

Source
clip_upper(max_val) : DataCol

Clip values to maximum

Source
coalesce(other : DataCol) : DataCol

Column-level coalesce - return first non-null from self or other

Source
compare(left : Int32, right : Int32, null_last = true) : Int32
Source
cumsum
Source
cut(bins : Array(Number), labels : Array(String) | Nil = nil, right : Bool = true) : StringCol

Bin values into discrete intervals (like pandas cut) bins: Array of bin edges (must be sorted ascending) labels: Optional labels for each bin (size must be bins.size - 1) right: If true (default), bins are (left, right], otherwise [left, right)

Source
desc
Source
div(val)
Source
equals(other : self)
Source
ffill

Forward fill nulls (propagate last valid value)

Source
first

Get first non-null value from column

Source
has_nulls?
Source
hash(hasher)

See Object#hash(hasher)

in?(set : Array) : Array(Bool)

Check if values are in a given set

Source
is_in(set : Array) : Array(Bool)

Check if values are in a given set (alias)

Source
is_na
Source
is_not_na
Source
lag(n = 1, default : Any = nil)
Source
last

Get last non-null value from column

Source
lead(n = 1, default : Any = nil)
Source
matching(missing_as = false, &) : Array(Bool)
Source
max(remove_na = false)
Source
mean(remove_na = false)
Source
median(remove_na = false)
Source
min(remove_na = false)
Source
minus(val)
Source
name
Source
nunique

Count of unique values

Source
order(na_last = true)
Source
pct_change
Source
plus(val)
Source
qcut(q : Int32, labels : Array(String) | Nil = nil) : StringCol

Quantile-based binning (like pandas qcut) q: Number of quantiles (e.g., 4 for quartiles, 10 for deciles) labels: Optional labels for each bin

Source
rank(na_last = true)
Source
sd(remove_na = false)
Source
size(*args, **options)
Source
size(*args, **options, &)
Source
str_contains(pattern : String | Regex, case_sensitive : Bool = true) : Array(Bool)

Check if strings contain a pattern

Source
str_downcase

Convert strings to lowercase

Source
str_ends_with(suffix : String, case_sensitive : Bool = true) : Array(Bool)

Check if strings end with suffix

Source
str_extract(pattern : Regex) : StringCol

Extract regex pattern from strings

Source
str_len

Get string lengths

Source
str_replace(pattern : String | Regex, replacement : String) : StringCol

Replace pattern in strings

Source
str_slice(start : Int32, length : Int32 | Nil = nil) : StringCol

Substring extraction

Source
str_starts_with(prefix : String, case_sensitive : Bool = true) : Array(Bool)

Check if strings start with prefix

Source
str_strip

Strip whitespace from strings

Source
str_upcase

Convert strings to uppercase

Source
sum(remove_na = false)
Source
times(val)
Source
to_s(io : IO) : Nil

Same as #inspect(io).

Source
to_s

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.

Source
unique

Get unique values in the column

Source
values
Source