Skip to content

API: silent overflow in Series(bigints, dtype="int8") #40114

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
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
bc51b86
REF: try_cast_integer_dtype
jbrockmendel Feb 27, 2021
0e4e8af
Merge branch 'master' into bug-maybe_cast_to_integer_array
jbrockmendel Feb 27, 2021
7649eb4
Merge branch 'master' into bug-maybe_cast_to_integer_array
jbrockmendel Feb 27, 2021
fcab68e
Merge branch 'master' into bug-maybe_cast_to_integer_array
jbrockmendel Feb 27, 2021
8ee8032
Merge branch 'master' into bug-maybe_cast_to_integer_array
jbrockmendel Feb 27, 2021
d87363a
Merge branch 'master' into bug-maybe_cast_to_integer_array
jbrockmendel Feb 27, 2021
bccccd0
Merge branch 'master' into bug-maybe_cast_to_integer_array
jbrockmendel Feb 28, 2021
52432c7
32bit compat
jbrockmendel Feb 28, 2021
7a0e0d6
Merge branch 'master' into bug-maybe_cast_to_integer_array
jbrockmendel Feb 28, 2021
e541374
troubleshoot windows
jbrockmendel Feb 28, 2021
ab109b6
xfail on windows
jbrockmendel Mar 1, 2021
785f828
Merge branch 'master' into bug-maybe_cast_to_integer_array
jbrockmendel Mar 3, 2021
710f31d
Merge branch 'master' into bug-maybe_cast_to_integer_array
jbrockmendel Mar 3, 2021
6c5cc5b
Merge branch 'master' into bug-maybe_cast_to_integer_array
jbrockmendel Mar 6, 2021
b7ee325
Merge branch 'master' into bug-maybe_cast_to_integer_array
jbrockmendel Mar 11, 2021
fcde0e1
Merge branch 'master' into bug-maybe_cast_to_integer_array
jbrockmendel Mar 11, 2021
c0ecaf2
Merge branch 'master' into bug-maybe_cast_to_integer_array
jbrockmendel Mar 12, 2021
b1e2bc2
troubleshoot mypy
jbrockmendel Mar 13, 2021
39fcbb9
troubleshoot mypy
jbrockmendel Mar 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
xfail on windows
  • Loading branch information
jbrockmendel committed Mar 1, 2021
commit ab109b6b1d4a3a1a5e892b3878f719aac362600d
9 changes: 7 additions & 2 deletions pandas/tests/frame/test_constructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
import pytest
import pytz

from pandas.compat import np_version_under1p19
from pandas.compat import (
is_platform_windows,
np_version_under1p19,
)

from pandas.core.dtypes.common import is_integer_dtype
from pandas.core.dtypes.dtypes import (
Expand Down Expand Up @@ -328,6 +331,9 @@ def test_constructor_int_overflow(self, values):
assert result[0].dtype == object
assert result[0][0] == value

@pytest.mark.xfail(
is_platform_windows(), reason="dict case result is int32 but expected is int64"
)
def test_constructor_int8_overflow(self):
# we silently ignore casting errors as dtype may not apply to all cols
vals = [1, 200, 923442]
Expand All @@ -340,7 +346,6 @@ def test_constructor_int8_overflow(self):
# not mixed-and-matched on 32bit/windows
result = DataFrame({"A": vals}, dtype="int8")
expected = DataFrame({"A": vals}, dtype=np.intp)
assert (expected.dtypes == np.intp).all() # troubleshoot windows builds
tm.assert_frame_equal(result, expected)

def test_constructor_ordereddict(self):
Expand Down