-
Notifications
You must be signed in to change notification settings - Fork 191
feat: Add {nw,DataFrame}.from_dicts
#3148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
dangotbanned
merged 26 commits into
narwhals-dev:main
from
felixgwilliams:feat/from_dicts
Sep 29, 2025
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
592d6fc
add placeholders for from_dicts function
felixgwilliams 9ea6a97
add implementation and unit tests
felixgwilliams 0e49901
add examples to docstrings copied from `from_dict`
felixgwilliams a411c33
address review comments
felixgwilliams a734b9b
remove test for deprecated call in from_dicts_test
felixgwilliams 01bb262
add v1 and v2 tests for from_dicts
felixgwilliams 77b3921
refactor: Skip unreachable `Unknown`
dangotbanned 076a821
change data type on from_dicts to Sequence[Mapping[str, Any]] and addβ¦
felixgwilliams 1dde847
use `types.MappingProxyType` instead of custom type to test non-dict β¦
felixgwilliams 130427d
Merge branch 'main' into feat/from_dicts
FBruzzesi 697bb66
handle mappings as dicts in from_dicts for polars <1.30
felixgwilliams cbbdc5d
docs: Move compat info to `FROM_DICTS_ACCEPTS_MAPPINGS` flag
dangotbanned 3b5ff0c
refactor(polars): Simplify empty cases
dangotbanned 06b0482
Update narwhals/_polars/dataframe.py
felixgwilliams 5e1164d
revert: Avoid introducing deprecated `native_namespace`
dangotbanned 3a2d4a3
refactor(typing): Use `IntoSchema` everywhere
dangotbanned c3e5936
docs: Remove *Returns* section
dangotbanned 1b37317
refactor(suggestion): Make stable functions, aliases
dangotbanned e0cf86d
test: Merge `dict` vs `Mapping` cases
dangotbanned 4154c81
test: Use `assert_equal_data`
dangotbanned 9b12199
add a more distinct example to from_dicts docstring
felixgwilliams 6603bf5
Apply suggestions from code review
felixgwilliams 868b488
tests: test to highlight how eager backends deal with inconsistent diβ¦
felixgwilliams 8de7904
Merge branch 'main' into feat/from_dicts
dangotbanned f2b45b6
Apply suggestions from code review
felixgwilliams a2e3d80
add tip on non-uniform keys to nw.from_dicts
felixgwilliams File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,6 +16,7 @@ | |
| - filter | ||
| - from_arrow | ||
| - from_dict | ||
| - from_dicts | ||
| - from_numpy | ||
| - gather_every | ||
| - get_column | ||
|
|
||
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.