-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TST: Don't cast in test_cython_agg_nullable_int #54248
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
@@ -336,15 +336,9 @@ def test_cython_agg_nullable_int(op_name): | |||
} | |||
) | |||
result = getattr(df.groupby("A")["B"], op_name)() | |||
df2 = df.assign(B=df["B"].astype("float64")) | |||
df2 = df.assign(B=df["B"]) |
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.
I think we want to still use NumPy dtypes here, then cast expected to the expected nullable dtype.
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.
Ah okay. I put back this cast and used convert_dtypes
to cast expected to the nullable dtype
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.
lgtm
Thanks @mroeschke |
xref https://github.com/pandas-dev/pandas/pull/54129/files#r1272774080
Nice find @rhshadrach!