You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
cuDF seems to be ignoring the index of the RHS when performing an assignment.
Steps/Code to reproduce bug
In the following example, assignment (1) treats y as if it were a series with an index [0, 1, 2], which deviates from the semantics of Pandas:
>>> import cudf
>>> x = cudf.Series([1, 2, 3])
>>> x
0 1
1 2
2 3
dtype: int64
>>> y = cudf.Series([3, 2, 1], index=[2, 1, 0])
>>> x.iloc[:] = y # (1)
>>> x
0 3
1 2
2 1
dtype: int64
Here is the result of the same program in Pandas:
>>> import pandas as pd
>>> x = pd.Series([1, 2, 3])
>>> x
0 1
1 2
2 3
dtype: int64
>>> y = pd.Series([3, 2, 1], index=[2, 1, 0])
>>> x.iloc[:] = y
>>> x
0 1
1 2
2 3
dtype: int64
Expected behavior
cuDF should yield the same result as Pandas. I believe internally Pandas performs a left outer join between indices of the LHS and the RHS to find the values of the RHS that correspond to the LHS.
The text was updated successfully, but these errors were encountered:
Describe the bug
cuDF seems to be ignoring the index of the RHS when performing an assignment.
Steps/Code to reproduce bug
In the following example, assignment (1) treats
y
as if it were a series with an index[0, 1, 2]
, which deviates from the semantics of Pandas:Here is the result of the same program in Pandas:
Expected behavior
cuDF should yield the same result as Pandas. I believe internally Pandas performs a left outer join between indices of the LHS and the RHS to find the values of the RHS that correspond to the LHS.
The text was updated successfully, but these errors were encountered: