Skip to content

maybe_promote: Restrict fill_value to scalar for non-object dtype #29416

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
merged 1 commit into from
Nov 6, 2019

Conversation

jbrockmendel
Copy link
Member

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. Added test_shift_object_non_scalar_fill for this.

With the new restriction on maybe_promote in place, we can get rid of all the box 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.

@gfyoung gfyoung added Clean Dtype Conversions Unexpected or buggy dtype conversions Internals Related to non-user accessible pandas implementation labels Nov 5, 2019
@gfyoung gfyoung requested a review from jreback November 5, 2019 20:49
@jreback jreback added this to the 1.0 milestone Nov 6, 2019
@jreback jreback merged commit a908ccb into pandas-dev:master Nov 6, 2019
@jreback
Copy link
Contributor

jreback commented Nov 6, 2019

thanks ! very nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Dtype Conversions Unexpected or buggy dtype conversions Internals Related to non-user accessible pandas implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants