Skip to content

Commit 129b1b5

Browse files
committed
TST: updated to proper comment and variable name
1 parent 52b7c21 commit 129b1b5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/tests/frame/methods/test_astype.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ def test_astype_cast_nan_inf_int(self, val, dtype):
140140
@pytest.mark.parametrize("dtype", ["Int64", "Int32", "Int16"])
141141
@pytest.mark.parametrize("val", [np.nan, NA])
142142
def test_astype_cast_via_loc_nan_int(self, val, dtype):
143-
# see GH#31861
143+
# GH31861
144144
expected = DataFrame({"a": ["foo"], "b": integer_array([val], dtype=dtype)})
145-
result = DataFrame({"a": ["foo"], "b": [val]})
146-
result.loc[:, "b"] = result.loc[:, "b"].astype(dtype)
147-
tm.assert_frame_equal(result, expected)
145+
df = DataFrame({"a": ["foo"], "b": [val]})
146+
df.loc[:, "b"] = df.loc[:, "b"].astype(dtype)
147+
tm.assert_frame_equal(df, expected)
148148

149149
def test_astype_str(self):
150150
# see GH#9757

0 commit comments

Comments
 (0)