Skip to content

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

Merged
merged 3 commits into from
Jul 26, 2023

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke added Testing pandas testing functions or related to the test suite Groupby labels Jul 24, 2023
@mroeschke mroeschke added this to the 2.1 milestone Jul 24, 2023
@@ -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"])
Copy link
Member

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.

Copy link
Member Author

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

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rhshadrach rhshadrach merged commit 317290a into pandas-dev:main Jul 26, 2023
@rhshadrach
Copy link
Member

Thanks @mroeschke

@rhshadrach rhshadrach added the NA - MaskedArrays Related to pd.NA and nullable extension arrays label Jul 26, 2023
@mroeschke mroeschke deleted the tst/gb/nullable branch July 26, 2023 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Groupby NA - MaskedArrays Related to pd.NA and nullable extension arrays Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants