maybe_promote: Restrict fill_value to scalar for non-object dtype #29416
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.
Partially reverts #29362 by allowing non-scalar fill_value for object dtypes. i.e. in 0.25.3
pd.Series(range(3), dtype=object).shift(1, fill_value={})
would work, #29362 broke that, and this restores it. Addedtest_shift_object_non_scalar_fill
for this.With the new restriction on
maybe_promote
in place, we can get rid of all thebox
tests and simplify test_promote a ton. This removes about 2500 tests. This also uncovers the fact that we were failing to run some of the non-box cases, which are now xfailed.