Render DataFrames as interactive notebook tables - #94
Draft
eosfor wants to merge 4 commits into
Draft
Conversation
Add a specialized formatter hook to execution contexts, distinguish generic fallback formatters, and centralize formatter resolution for both explicit Display calls and language kernels. Document the extension contract and cover priority, fallback, and failure behavior with tests. Signed-off-by: eosfor <9363027+eosfor@users.noreply.github.com>
Preserve raw PSObject results until the kernel can offer each runtime value to specialized IDataFormatter extensions. Batch contiguous unhandled objects through the existing PowerShell ETS renderer so native table formatting and mixed-output ordering remain intact. Signed-off-by: eosfor <9363027+eosfor@users.noreply.github.com>
Signed-off-by: eosfor <9363027+eosfor@users.noreply.github.com>
Signed-off-by: eosfor <9363027+eosfor@users.noreply.github.com>
eosfor
force-pushed
the
pr/dataframe-formatter-extension
branch
from
August 1, 2026 04:14
833cec5 to
a4eb66b
Compare
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.
Important
This PR is stacked on #93 and should be reviewed after it. Because the head branches live in a fork, GitHub cannot use the first PR's fork branch as the base of an upstream PR. Until #93 is merged, this diff also contains its two commits. The DataFrame-specific commits are
f7b8b84anda4eb66b.Summary
Verso.DataFrameextension forMicrosoft.Data.Analysis.DataFramevaluesPSObjectvalues through reflectionWhy
PowerShell data-analysis modules can expose
Microsoft.Data.Analysis.DataFrame, but the default output only reveals the object'sColumnsandRowsproperties. A notebook needs a readable table while preserving extension isolation from the language kernel that owns the runtime assembly.The extension deliberately has no compile-time dependency on
Microsoft.Data.Analysis. It recognizes and reads the public DataFrame shape through reflection, avoiding type-identity conflicts when PowerShell loads a different version or load context.User impact
Both implicit PowerShell output and explicit display now produce the same table:
Manual validation used the Palmer Penguins dataset: 344 rows and 8 columns, with the preview correctly reporting
Showing 100 of 344 rows.Validation
dotnet test Verso.sln --no-restoreVerso.DataFrame.Tests: 11 passedverso.dataframe.formatterVerso.DataFramehas noMicrosoft.Data.AnalysisdependencyDisplay $penguinsusing the PowerShell DataFrame moduleThe full solution test suite passes. Existing dependency-analysis and documentation warnings are unchanged.