Conversation
Task 10: Add docs/excel.fsx — comprehensive documentation page for Deedle.Excel.Reader (cross-platform xlsx/xls reading) and Deedle.Excel (Windows live-Excel writer). Includes two sample data files under docs/data/ (sales.xlsx, quarterly.xlsx). Links excel.html from docs/index.fsx. Task 8: Performance improvements to Frame.stack and Frame.unstack: - Frame.stack: precompute per-column data vectors and per-row addresses before the nested loop, eliminating O(rows×cols) redundant index lookups (dictionary lookups saved: (rows-1)×cols for col addresses and (cols-1)×rows for row addresses). - Frame.unstack: single-pass extraction of unique r1/r2 keys using HashSet-backed ResizeArray, replacing two Seq.map|>Seq.distinct traversals of the row index. Test status: all 703 tests pass. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dsyme
approved these changes
Apr 6, 2026
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.
🤖 This is an automated pull request from Repo Assist, an AI assistant for this repository.
Summary
Two improvements in one PR (Tasks 10 and 8 from this run):
Task 10 —
docs/excel.fsx: Excel integration documentation pageAdds a comprehensive documentation page covering both Excel packages:
Deedle.Excel.Reader.xlsx/.xlsfiles via ExcelDataReaderDeedle.ExcelSections
openstatementsreadExcelreadExcelSheetreadExcelSheetByIndexsheetNamesobjcolumns are coerced; empty cells as missingtry/withpatternDeedle.Excellive-write APITwo small sample data files are added to
docs/data/(sales.xlsxandquarterly.xlsx) to support live evaluation in fsdocs. A link toexcel.htmlis added todocs/index.fsx.Task 8 — Performance:
Frame.stackandFrame.unstackFrame.stackBefore: the nested
for rowKey in rows do for colKey in cols doloop calledframe.ColumnIndex.Locate(colKey)andframe.RowIndex.Locate(rowKey)on every cell — O(rows × cols) total dictionary lookups for each axis.After: precompute per-column data vectors (once per column) and per-row addresses (once per row) before entering the nested loop. The inner loop now only calls
vec.GetObject(rowAddr)— no index lookups.Frame.unstackBefore: iterated
frame.RowIndex.Keystwice — once to collect uniquefstkeys and once forsndkeys (Seq.map fst |> Seq.distinct |> Array.ofSeq).After: single pass using
HashSet<'R1>andHashSet<'R2>with correspondingResizeArrays, maintaining first-occurrence order. Keys are iterated once.Test Status
All 703 tests pass. Semantics are unchanged — same outputs, fewer allocations and dictionary lookups.