Skip to content

Commit 030d659

Browse files
author
Mateusz Górski
committed
Merge branch 'index_map' of https://github.com/Reksbril/pandas into index_map
2 parents 41bdd63 + aa6d8bc commit 030d659

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pandas/tests/series/indexing/test_indexing.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,3 +950,12 @@ def test_index_map():
950950
b.index = a.index.map(lambda x: (x.year, x.month))
951951
except ValueError:
952952
pytest.fail("Unexpected ValueError")
953+
954+
955+
def test_uint_drop(any_int_dtype):
956+
# see GH18311
957+
# assigning series.loc[0] = 4 changed series.dtype to int
958+
series = pd.Series([1, 2, 3], dtype=any_int_dtype)
959+
series.loc[0] = 4
960+
expected = pd.Series([4, 2, 3], dtype=any_int_dtype)
961+
tm.assert_series_equal(series, expected)

0 commit comments

Comments
 (0)