Skip to content

Commit c30cf1d

Browse files
add separate test for #62518
1 parent 968cdeb commit c30cf1d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pandas/tests/indexing/multiindex/test_multiindex.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,12 @@ def test_multiindex_assign_aligns_as_implicit_tuple(self):
272272
tm.assert_frame_equal(df1, df2)
273273
tm.assert_frame_equal(df1, df3)
274274

275+
def test_multiindex_assign_alignment_with_non_string_dtype(self):
275276
# GH 62518
276-
df4 = DataFrame(
277+
meta = DataFrame(
277278
columns=MultiIndex.from_arrays(
278-
[["a", "a", "z", "z"], pd.Categorical([1, 2, 1, 2])],
279+
[["a", "a", "z", "z"], pd.Categorical([1, 2, 1, 2])]
279280
),
280281
dtype=object,
281282
)
282-
df4["z"] = df4["z"].astype("int64")
283+
meta["z"] = meta["z"].astype("int64")

0 commit comments

Comments
 (0)