Skip to content

Commit

Permalink
Only wrap
Browse files Browse the repository at this point in the history
  • Loading branch information
isVoid committed Feb 5, 2022
1 parent 1caa64f commit 0a80678
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions python/cudf/cudf/tests/test_struct.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,13 +207,11 @@ def test_dataframe_to_struct():

# check that a non-string (but convertible to string) named column can be
# converted to struct
df = cudf.DataFrame([[1, 2], [3, 4]], columns=[(1, "b"), 0])
expect = cudf.Series([{"(1, 'b')": 1, "0": 2}, {"(1, 'b')": 3, "0": 4}])
with pytest.warns(UserWarning, match="will be casted"):
df = cudf.DataFrame([[1, 2], [3, 4]], columns=[(1, "b"), 0])
expect = cudf.Series(
[{"(1, 'b')": 1, "0": 2}, {"(1, 'b')": 3, "0": 4}]
)
got = df.to_struct()
assert_eq(got, expect)
assert_eq(got, expect)


@pytest.mark.parametrize(
Expand Down

1 comment on commit 0a80678

@bdice
Copy link
Contributor

@bdice bdice commented on 0a80678 Feb 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5E04EC39-6907-4FF6-80F0-187309F24413

Please sign in to comment.