Skip to content

ENH: should shift return same dtype objects as input? #2761

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

Closed
jreback opened this issue Jan 27, 2013 · 1 comment
Closed

ENH: should shift return same dtype objects as input? #2761

jreback opened this issue Jan 27, 2013 · 1 comment

Comments

@jreback
Copy link
Contributor

jreback commented Jan 27, 2013

see the example in #2759

should certain operations, e.g. shift preserve the dtype of the output object,
simulated like this (rather than return an upcasted version)
this obviously is easier if we had an integer NA

would have to add a fillna keyword to shift to make this work
(so we don't have to guess on the fill value for integer/bool types)

mask.astype('O').shift().fillna(0).astype(mask.dtype)
@jreback
Copy link
Contributor Author

jreback commented Feb 15, 2013

did what we could via #2708, #2871, #2838

@jreback jreback closed this as completed Feb 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant