Fix where skipping wrangles when all rows are filtered ou - #1007
Merged
Conversation
2 tasks
* Add split.dictionary to_lists mode
mborodii-prog
force-pushed
the
1005-bug-where-passes-empty-dataframe
branch
from
July 1, 2026 10:13
b876306 to
82640b9
Compare
* enable package build on main branch
* Create Column should NOT error if column exists
* Add n parameter to lookup for multi-match retrieval
* convert.from_json and convert.from_yaml accept default as a list when input is also a list * 985-enhancement-allow-list-of-onemultiple-defaults
ebhills
requested changes
Jul 1, 2026
Contributor
Author
|
@ebhills now it must be working fine (batch_size = 1) |
ebhills
approved these changes
Jul 2, 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.


Fix:
whereskips wrangles when all rows are filtered outProblem
When a
whereclause matched no rows, the resulting empty DataFrame was still passed into the wrangle for execution. This became an issue for chained wrangles where an earlier step creates a column that a later step depends on — because on an empty DataFrame no new columns are ever produced.Failing example:
With input data:
{}FalseError produced:
Fix
In
wrangles/recipe.py, after_filter_dataframe(), added a four-line guard — ifwhereproduces an empty DataFrame, restore the original andcontinueto the next wrangle without executing:Behaviour after fix
All rows filtered out → wrangle skipped, data unchanged:
{}FalseNo error, no spurious columns added.
Partial match → still works correctly:
{'summary': 'this is a summary', 'other key': '...'}Truethis is a summary...{}FalseOnly the matching row is processed; unmatched rows are merged back unchanged.