Skip to content

Commit

Permalink
change test
Browse files Browse the repository at this point in the history
  • Loading branch information
galipremsagar committed Oct 6, 2021
1 parent 73d838f commit cb299b4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion python/cudf/cudf/tests/test_struct.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,15 @@ def test_struct_with_datetime_and_timedelta(dtype):
}
)
series = df.to_struct()
a_array = np.array([12, 232, 2334])
datetime_array = np.array([23432, 3432423, 324324]).astype(dtype)

actual = series.to_pandas()
expected = pd.Series(series.to_arrow().tolist())
values_list = []
for i, val in enumerate(a_array):
values_list.append({"a": val, "datetime": datetime_array[i]})

expected = pd.Series(values_list)
assert_eq(expected, actual)


Expand Down

0 comments on commit cb299b4

Please sign in to comment.