Conversation
Three new instance-style extension methods for C# users: - ZipInto(series2, Func<V1,V2,R>) — inner-join combination with a user-supplied function; the primary C# workaround for custom-type arithmetic (#524). - ZipAlignInto(series2, Func<OptionalValue<V1>,OptionalValue<V2>, OptionalValue<R>>, JoinKind, Lookup) — full-control variant for outer / left / right join with missing-value handling via the Deedle-native OptionalValue<T> type. - ZipInner(series2) — inner-join that returns Series<K, (V1,V2)> tuples; C# equivalent of the existing F# Series.zipInner. These functions already existed in SeriesModule.fs; this PR exposes them as ergonomic extension methods so C# users can call s1.ZipInto(s2, (a, b) => a + b) in fluent chains. Addresses #207 (C# API sync) and provides the recommended workaround for #524 (generic operator overloading). Co-authored-by: Copilot <[email protected]>
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Repo Assist — adding C# extension methods for series combination operations.
Problem
Deedle's arithmetic operators on
Series(K,V)only work for built-in numerictypes (
int,float,decimal, etc.). C# users who want to combine twoseries element-wise using a custom value type (e.g. a struct with its own
+operator) have no ergonomic way to do so — the existing F# modulefunctions (
Series.zipInto,Series.zipInner,Series.zipAlignInto) areaccessible from C# only through the static module syntax, not as fluent
instance methods.
This is the root cause of the issue reported in #524, and is part of the
broader C# API gap tracked in #207.
Solution
Three new
[(Extension)]methods are added toSeriesExtensions.fs:ZipInto— inner-join combination with a user functionZipInner— inner-join, returns paired tuplesZipAlignInto— full-control variant with join kind and missing valuesAll 669 existing tests pass.