Skip to content

BUG: fix unsafe dtype conversion in Series #3292

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 2 commits into from
Apr 9, 2013
Merged

Conversation

jreback
Copy link
Contributor

@jreback jreback commented Apr 9, 2013

fixes assignment to smaller itemsizes on dtype upcasting

@jreback
Copy link
Contributor Author

jreback commented Apr 9, 2013

@wesm this should fix it. FYI once series inherits from NDFrame this magic is completely gone (as its a simple block change, which is easy to do even inplace)

     allow boolean indexing of series w/o changing the dtype
     with a list of the rhs if we can preserver the dtype
     of the input, if we can't upcast, but can only do this
     in cases where we won't change the itemsize
@jreback
Copy link
Contributor Author

jreback commented Apr 9, 2013

@wesm this new version is cleaner

@wesm
Copy link
Member

wesm commented Apr 9, 2013

Shoehorning Series.where into working for the __setitem__ case isn't totally satisfactory but this will work. At some point this all will need to get cleaned up

wesm added a commit that referenced this pull request Apr 9, 2013
BUG: fix unsafe dtype conversion in Series
@wesm wesm merged commit 1569838 into pandas-dev:master Apr 9, 2013
@jreback
Copy link
Contributor Author

jreback commented Apr 9, 2013

@wesm already set to clean up in 0.12. where is moved to core/generic.py and a dtype change is simple because just make a new block...coming soon

@jreback
Copy link
Contributor Author

jreback commented Apr 9, 2013

@y-p sorry....:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants