Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

GH-45570: [Python] Allow Decimal32/64Array.to_pandas #45571

Merged
merged 4 commits into from
Feb 20, 2025

Conversation

mroeschke
Copy link
Contributor

@mroeschke mroeschke commented Feb 19, 2025

Rationale for this change

Enables converting Decimal32Array and Decimal64Array to pandas

What changes are included in this PR?

Adds Type::DECIMAL32 and Type::DECIMAL64 as convertible types to pandas

Are these changes tested?

Yes

Are there any user-facing changes?

Yes

closes #45570

Copy link

⚠️ GitHub issue #45570 has been automatically assigned in GitHub to PR creator.

Copy link
Member

@raulcd raulcd left a comment

Choose a reason for hiding this comment

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

Just a minor lint issue, the change looks good to me.

@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting review Awaiting review labels Feb 19, 2025
@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting merge Awaiting merge labels Feb 19, 2025
Comment on lines 2044 to 2048
@pytest.mark.parametrize("typ", [
pa.decimal32,
pa.decimal64,
pa.decimal128,
])
Copy link
Member

Choose a reason for hiding this comment

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

Can you add decimal256 into the mix, or does it actually not work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, added decimal256 as it appears to work

@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Feb 19, 2025
Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

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

+1, thank you @mroeschke !

@pitrou pitrou merged commit ce012eb into apache:main Feb 20, 2025
15 checks passed
@pitrou pitrou removed the awaiting change review Awaiting change review label Feb 20, 2025
@github-actions github-actions bot added the awaiting committer review Awaiting committer review label Feb 20, 2025
@mroeschke mroeschke deleted the bug/to_pandas/decimal32_64 branch February 20, 2025 17:07
Copy link

After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit ce012eb.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 4 possible false positives for unstable benchmarks that are known to sometimes produce them.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Python] Enable pyarrow.Decimal32/64Array.to_pandas
3 participants