Skip to content
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

TST: Added test for pivot_table with int64 dtype and dropna parameter #60374

Merged
merged 3 commits into from
Nov 21, 2024

Conversation

AbhishekChaudharii
Copy link
Contributor

@AbhishekChaudharii AbhishekChaudharii commented Nov 20, 2024

result = df.pivot_table(
index="x", columns="y", values="age", aggfunc="mean", dropna=dropna
)
expected_dtype = "float64" if dtype == "int64" else "Float64"
Copy link
Member

Choose a reason for hiding this comment

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

Could you put this in the parametrize instead?

@mroeschke mroeschke added the Testing pandas testing functions or related to the test suite label Nov 20, 2024
@mroeschke mroeschke added this to the 3.0 milestone Nov 21, 2024
@mroeschke mroeschke merged commit f363721 into pandas-dev:main Nov 21, 2024
51 checks passed
@mroeschke
Copy link
Member

Thanks @AbhishekChaudharii

@AbhishekChaudharii
Copy link
Contributor Author

Happy to help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: pivot_table downcasting dtypes even if not necessary
2 participants