Skip to content

BUG: setting td64 value into numeric Series incorrectly casting to int #39488

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 9 commits into from
Feb 3, 2021
Prev Previous commit
Next Next commit
np 1.20 compat
  • Loading branch information
jbrockmendel committed Jan 30, 2021
commit 6cf396ac2feaf73ae2f5594ae4474ca0191e23e3
4 changes: 2 additions & 2 deletions pandas/tests/indexing/test_loc.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import numpy as np
import pytest

from pandas.compat import is_numpy_dev
from pandas.compat import np_version_under1p20
import pandas.util._test_decorators as td

import pandas as pd
Expand Down Expand Up @@ -978,7 +978,7 @@ def test_loc_setitem_empty_append_single_value(self):
df.loc[0, "x"] = expected.loc[0, "x"]
tm.assert_frame_equal(df, expected)

@pytest.mark.xfail(is_numpy_dev, reason="gh-35481")
@pytest.mark.xfail(not np_version_under1p20, reason="gh-35481")
def test_loc_setitem_empty_append_raises(self):
# GH6173, various appends to an empty dataframe

Expand Down
7 changes: 6 additions & 1 deletion pandas/tests/series/indexing/test_setitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import numpy as np
import pytest

from pandas.compat import np_version_under1p20

from pandas import (
DatetimeIndex,
Index,
Expand Down Expand Up @@ -611,7 +613,10 @@ def test_index_where(self, obj, key, expected, val, request):
res = Index(obj).where(~mask, val)
tm.assert_index_equal(res, Index(expected))

@pytest.mark.xfail(reason="Index/Series casting behavior inconsistent GH#38692")
@pytest.mark.xfail(
np_version_under1p20,
reason="Index/Series casting behavior inconsistent GH#38692",
)
def test_index_putmask(self, obj, key, expected, val):
if Index(obj).dtype != obj.dtype:
pytest.skip("test not applicable for this dtype")
Expand Down