API/BUG: Handling Dtype Coercions in Series/Index
See original GitHub issueOff master
(bd169d):
# Case I: Overflow on int64
>>> Index([np.iinfo(np.uint64).max-1],dtype='int64')
...
OverflowError: Python int too large to convert to C long
# Case II: Coercion to uint64
>>> Index([-1], dtype='uint64')
UInt64Index([18446744073709551615], dtype='uint64')
# Case III: Ignoring coercion to int
>>> Index([1, 2, 3.5], dtype=int)
Float64Index([1.0, 2.0, 3.5], dtype='float64')
So we got some coercions that fail but others that work. Although all of these issues involve Index
, the first two are also applicable to Series
(in the last issue, it does coerce all elements to integer).
How should we handle failed coercions? Is the second case even a failure? Should iron out this.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Now that we were able to close 1 novice and 2 intermediate bugs, I’d like to try an advanced bug - this one 😃
sure removing xfail is good @jbrockmendel has done a lot of work on these conversions and they r likely much more sane