Skip to content

BUG: where coerces numeric to str incorrectly #9283

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
Jan 18, 2015

Conversation

sinhrks
Copy link
Member

@sinhrks sinhrks commented Jan 17, 2015

Closes #9280.

@jreback jreback added Bug Dtype Conversions Unexpected or buggy dtype conversions labels Jan 17, 2015
@jreback jreback added this to the 0.16.0 milestone Jan 17, 2015
@@ -1052,6 +1052,11 @@ def where(self, other, cond, align=True, raise_on_error=True,
values = values.T
is_transposed = not is_transposed

if isinstance(other, string_types):
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe move this logic to core/common.py (and call the function here), something like _maybe_convert_string_to_object (possibly also see if code like this is duplicacted elsewhere)

@sinhrks
Copy link
Member Author

sinhrks commented Jan 18, 2015

OK, separated to different function and add tests.

jreback added a commit that referenced this pull request Jan 18, 2015
BUG: where coerces numeric to str incorrectly
@jreback jreback merged commit b3e3add into pandas-dev:master Jan 18, 2015
@jreback
Copy link
Contributor

jreback commented Jan 18, 2015

@sinhrks thanks!

@sinhrks sinhrks deleted the where_dtype branch January 19, 2015 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Dtype Conversions Unexpected or buggy dtype conversions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: where incorrectly coerces to str
2 participants