Skip to content

[Repo Assist] Add Series.empty and Frame.empty module functions (closes #56)#607

Merged
dsyme merged 2 commits intomasterfrom
repo-assist/add-empty-56-bd8b2b661ea1b054
Mar 9, 2026
Merged

[Repo Assist] Add Series.empty and Frame.empty module functions (closes #56)#607
dsyme merged 2 commits intomasterfrom
repo-assist/add-empty-56-bd8b2b661ea1b054

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Mar 9, 2026

🤖 This is an automated PR from Repo Assist.

Implements the Frame.empty and Series.empty values requested in #56.

What's Added

Series.empty

let empty<'K, 'V when 'K : equality> : Series<'K, 'V>

Returns an empty series with no keys or values.

Frame.empty

let empty<'R, 'C when 'R : equality and 'C : equality> : Frame<'R, 'C>

Returns an empty data frame with no rows or columns.

Example

let s : Series(int, float) = Series.empty
let df : Frame(int, string) = Frame.empty

// Useful as a starting point for fold-style frame construction:
let df =
    columns
    |> List.fold (fun acc (name, data) -> acc |> Frame.addCol name data) Frame.empty

Design Notes

  • Both are typed let bindings with explicit type parameters — the F# compiler infers the concrete type from usage context, exactly as callers expect.
  • The implementation delegates to the existing Series([], []) / Frame([], []) constructors so there is no duplication of logic.

Test Status

✅ All 490 tests pass (5 new tests added covering empty series and frame creation, merging, and column addition).

Generated by Repo Assist ·

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@30f2254f2a7a944da1224df45d181a3f8faefd0d

Add Series.empty<'K,'V> and Frame.empty<'R,'C> as typed module-level
values that return an empty series / frame. Previously the only way to
construct an empty series or frame was through the class constructors
(Series([], []) / Frame([], [])) which are not discoverable via the
module API.

Co-authored-by: Copilot <[email protected]>
@dsyme dsyme marked this pull request as ready for review March 9, 2026 12:42
@dsyme dsyme merged commit 139d33f into master Mar 9, 2026
2 checks passed
@dsyme dsyme deleted the repo-assist/add-empty-56-bd8b2b661ea1b054 branch March 9, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant