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
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Polars.
Issue description
Using diff() on a column of unsigned ints causes wrap-around when the difference between two rows is negative. I guess there are cases where this is what you would want to compute, but it is not intuitive. For example:
Polars version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of Polars.
Issue description
Using
diff()
on a column of unsigned ints causes wrap-around when the difference between two rows is negative. I guess there are cases where this is what you would want to compute, but it is not intuitive. For example:This is also confusing because
pct_change
correctly compute a negative percent change on this example:This seems dangerous, since it is easy to be unknowingly handed data that stores an integer column as unsigned.
Reproducible example
Expected behavior
I think that the result should be the intuitive one, namely
Installed versions
The text was updated successfully, but these errors were encountered: