-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: dataframe.rolling along rows drops float16 #42884
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
debnathshoham
commented
Aug 4, 2021
- closes BUG: DataFrame.rolling(axis=1) operations drop/ignore float16 and float32 columns #41779
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls add a whatsnew note, bug fixes 1.4, rolling section
pandas/tests/window/test_rolling.py
Outdated
@@ -1432,3 +1432,30 @@ def test_rolling_float_dtype(float_dtype): | |||
expected = DataFrame({"A": [np.nan] * 5, "B": range(10, 20, 2)}, dtype=float_dtype) | |||
result = df.rolling(2, axis=1).sum() | |||
tm.assert_frame_equal(result, expected, check_dtype=False) | |||
|
|||
|
|||
def test_rolling_rows(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> test_rolling_numeric_dtypes
# GH#41779 | ||
df = DataFrame(np.arange(24).reshape(4, 6), columns=list("abcdef")).astype( | ||
{ | ||
"a": "float16", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add the uint dtypes as well
thanks @debnathshoham failures unrelated |