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

BUG: preserve join keys dtype #13170

Closed
wants to merge 2 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@jreback
Contributor

jreback commented May 13, 2016

  • closes #8596, preserve join keys dtype
  • adds Index.where method for all Index types (like np.where/Series.where), but preserves dtypes

@jreback jreback added this to the 0.18.2 milestone May 13, 2016

@jreback

View changes

Show outdated Hide outdated pandas/tseries/period.py
Return an Index of same shape as self and whose corresponding
entries are from self where cond is True and otherwise are from
other.

This comment has been minimized.

@jreback

jreback May 13, 2016

Contributor

@sinhrks I wish that could get some more uniformity w.r.t. Periods. I realize that there is a bug here with other which I fixed in tseries/base.py/.where, end up duplicating code here.

@jreback

jreback May 13, 2016

Contributor

@sinhrks I wish that could get some more uniformity w.r.t. Periods. I realize that there is a bug here with other which I fixed in tseries/base.py/.where, end up duplicating code here.

This comment has been minimized.

@jreback

jreback May 14, 2016

Contributor

its more complicated. I needed prelim logic different fro dti & period, so would have to have a helper function. We do this a fair amount, e.g. process for timezones, run a function, then reverse. Its ok the way we do it now, but it does duplicate some code.

@jreback

jreback May 14, 2016

Contributor

its more complicated. I needed prelim logic different fro dti & period, so would have to have a helper function. We do this a fair amount, e.g. process for timezones, run a function, then reverse. Its ok the way we do it now, but it does duplicate some code.

@jreback

This comment has been minimized.

Show comment
Hide comment
@jreback

jreback May 24, 2016

Contributor

ok, removed the dep on my other PR.

@sinhrks @jorisvandenbossche @TomAugspurger comments?

Contributor

jreback commented May 24, 2016

ok, removed the dep on my other PR.

@sinhrks @jorisvandenbossche @TomAugspurger comments?

@jreback

This comment has been minimized.

Show comment
Hide comment
@jreback

jreback May 26, 2016

Contributor

@sinhrks any comments on this?

Contributor

jreback commented May 26, 2016

@sinhrks any comments on this?

miketkelly and others added some commits Oct 22, 2014

BUG: preserve merge keys dtypes when possible
closes #8596

xref to #13169 as assignment of Index of bools not retaining dtype

@jreback jreback closed this in e8d9e79 May 27, 2016

jreback added a commit that referenced this pull request May 27, 2016

nps added a commit to nps/pandas that referenced this pull request May 30, 2016

BUG: preserve join keys dtype
- closes #8596, preserve join keys dtype  - adds ``Index.where``
method for all Index types (like ``np.where/Series.where``), but
preserves dtypes

Author: Jeff Reback <jeff@reback.net>
Author: Mike Kelly <mtk@numeric.com>

Closes #13170 from jreback/merge2 and squashes the following commits:

0a267cf [Jeff Reback] BUG: preserve merge keys dtypes when possible
4173dbf [Mike Kelly] Preserve dtype in merge keys when possible

nps added a commit to nps/pandas that referenced this pull request May 30, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment