Frame / column operations #27

Merged
HEL merged 36 commits from feat/simple-frame-ops into main 2026-07-03 10:29:32 +00:00
Owner

This PR mainly adds method registries for frames, columns, and their group-by counterparts. It implements a number of methods and attributes, including arithmetic operations (+, -, *, /, etc.), comparisons (>, <, >=, <=, etc.) and aggregation methods (min, max, mean, median, etc.). The type checker will try and infer the resulting type, and fallback to a top type if it cannot properly express it. For example, ColumnType[int].mean() results in ColumnType[Any], whilst ColumnType[int].median() results in Column[int] because the median is necessarily one of the column's values.
Where possible, inference is delegated to the columns / inner types.

Element-wise operations also generate an assertion to ensure that the two operands have the same number of elements.

This PR mainly adds method registries for frames, columns, and their group-by counterparts. It implements a number of methods and attributes, including arithmetic operations (+, -, *, /, etc.), comparisons (>, <, >=, <=, etc.) and aggregation methods (min, max, mean, median, etc.). The type checker will try and infer the resulting type, and fallback to a top type if it cannot properly express it. For example, `ColumnType[int].mean()` results in `ColumnType[Any]`, whilst `ColumnType[int].median()` results in `Column[int]` because the median is necessarily one of the column's values. Where possible, inference is delegated to the columns / inner types. Element-wise operations also generate an assertion to ensure that the two operands have the same number of elements.
HEL self-assigned this 2026-07-03 10:29:14 +00:00
HEL added 35 commits 2026-07-03 10:29:14 +00:00
safely adding two dataframes is only possible if the sizes are the same, or null values could be added dynamically to pad the shortest dataframe
delegate element-wise binary operation on frames to columns
delegate element-wise binary operation on columns to their inner types
HEL added 1 commit 2026-07-03 10:29:18 +00:00
HEL merged commit c6cc38bfeb into main 2026-07-03 10:29:32 +00:00
HEL deleted branch feat/simple-frame-ops 2026-07-03 10:29:33 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: HEL/midas#27