-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG/DOC: DataFrame.values return type when uint64 is mixed with signed int types #10364
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
Comments
so this could certainly have an expanded doc-string (and maybe a link to Certainly |
Author: Sašo Stanovnik <[email protected]> Closes #13917 from sstanovnik/fix-multitype-series-slice and squashes the following commits: 8c7d1ea [Sašo Stanovnik] Colon to comma. 057d56b [Sašo Stanovnik] Wording and code organization fixes. 926ca1e [Sašo Stanovnik] Fix a derp. 442b8c1 [Sašo Stanovnik] Whatsnew, issue tag, test reordering. 8d675ad [Sašo Stanovnik] Add tests for common dtypes, raises check for pandas ones. eebcb23 [Sašo Stanovnik] Moved multitype tests to sparse/tests/test_multitype.py ac790d7 [Sašo Stanovnik] Modify .values docs to process issue #10364. 2104948 [Sašo Stanovnik] Factor the common type discovery to an internal function. 6782bc7 [Sašo Stanovnik] Revert default argument change. 93d2de6 [Sašo Stanovnik] Modified the whatsnew message. 33973a5 [Sašo Stanovnik] Additional multitype tests. 114217e [Sašo Stanovnik] Infer dtype instead of forcing float in SparseArray. c7fb0f2 [Sašo Stanovnik] Use numpy to determine common dtypes. fb6237c [Sašo Stanovnik] Add a whatsnew note. 2e833fa [Sašo Stanovnik] BUG: multi-type sparse slicing fixes and improvements
This was addressed via #13917 and should be closed. Thanks to @sstanovnik, @sinhrks and @jreback for the fix and @kawochen for the issue! |
@gfyoung just noticed this a uint64 issue! |
Hmm they seem to be everywhere 😀. Should double check that it's resolved. |
@jreback : Okay, this is not resolved as I had thought. So when we call |
This was indeed addressed in the linked PR, test has changed here: https://github.com/pandas-dev/pandas/pull/13917/files#diff-137c96159899927aedd9b37f0f7dddf8R117 Returning float is following the numpy rules.
What do you mean exactly? That it should return object? Before (< 0.19.0), it returned int64, now it returns float64. Current
|
Fixed by #13917 |
@jorisvandenbossche : The reason why I asked about I agree the documentation is very clear on the behavior, but whether it should be consistent with how we handle other |
DataFrame.values
' doc mentions type promotion but leaves out that whenuint64
is mixed with signedint
types, the return type isint64
, which can be surprising. Perhaps consider returningdtype(object)
ininternals._interleaved_dtype
whenuint64
and signedint
s are present?The text was updated successfully, but these errors were encountered: