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
The behavior of DataFrame.reindex fails doctests and differs from pandas. From a preliminary discussion in our dev meeting, we may have the behavior that we intend already in place -- this issue can be closed if we choose to keep the current implementation and update the doctests in #9815 to match.
Steps/Code to reproduce bug
This doctest (#9815) fails:
I think here we have the right behaviour. All our types are nullable, so we can afford to use <NA> as a null value and avoid casting things to float. We may need a way of telling doctests to not check the result dtypes when necessary (similar to the check_dtype=False argument to assert_frame_equal in pytests).
bdice
added a commit
to bdice/cudf
that referenced
this issue
Dec 3, 2021
@shwina Awesome, thanks for confirming. I have updated the doctest and will close this issue.
We may need a way of telling doctests to not check the result dtypes when necessary (similar to the check_dtype=False argument to assert_frame_equal in pytests).
No additional changes are necessary beyond updating the output of the example in 699c21a. Doctests execute the commands and compare the printed output. In some sense, doctests are a test of the REPL environment and validate the workings of repr / str methods.
Describe the bug
The behavior of
DataFrame.reindex
fails doctests and differs from pandas. From a preliminary discussion in our dev meeting, we may have the behavior that we intend already in place -- this issue can be closed if we choose to keep the current implementation and update the doctests in #9815 to match.Steps/Code to reproduce bug
This doctest (#9815) fails:
cudf/python/cudf/cudf/core/dataframe.py
Lines 2254 to 2272 in 582cc6e
Below is the doctest output:
Expected behavior
Pandas gives the following output (uses
NaN
instead of<NA>
, and casts the columnkey
to typefloat64
):The text was updated successfully, but these errors were encountered: