Skip to content

Disallow non-scalar fill_value in maybe_upcast #29362

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 5 commits into from
Nov 4, 2019

Conversation

jbrockmendel
Copy link
Member

Along with #29331 and #29332 this allows us to rule out non-scalar fill_value being passed to maybe_promote for almost all cases, the last few of which we'll have to address individually.

The restriction in Block.shift could be an API change if you squint and tilt your head.

The assertion in masked_rec_array_to_mgr is based on my read of the numpy docs, but it'd be worth double-checking.

@jbrockmendel jbrockmendel changed the title Maybe upcast nomask Disallow non-scalar fill_value in maybe_upcast Nov 2, 2019
@jreback jreback added Dtype Conversions Unexpected or buggy dtype conversions Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate labels Nov 2, 2019
@jreback
Copy link
Contributor

jreback commented Nov 2, 2019

this is orthogonal to #29331 ?

@jreback jreback added this to the 1.0 milestone Nov 2, 2019
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need additional tests here?

@jbrockmendel
Copy link
Member Author

this is orthogonal to #29331 ?

correct

do we need additional tests here?

for maybe_upcast_putmask i dont think so. for Block.shift maybe; im still a little iffy on the object-dtype case there

@jreback jreback merged commit 5742eb6 into pandas-dev:master Nov 4, 2019
@jreback
Copy link
Contributor

jreback commented Nov 4, 2019

thanks, pls followon tests as needed

@jbrockmendel jbrockmendel deleted the maybe_upcast_nomask branch November 4, 2019 14:59
Reksbril pushed a commit to Reksbril/pandas that referenced this pull request Nov 18, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dtype Conversions Unexpected or buggy dtype conversions Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants