Skip to content

adding explode #327

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 14 commits into from
Aug 14, 2025
Merged

adding explode #327

merged 14 commits into from
Aug 14, 2025

Conversation

Graciaaa3
Copy link
Collaborator

Change Description

Added the explode() function extension to work for nested structure. In addition to regular explode on the base columns, the extension includes "unnesting" single nested column by expanding it.

  • My PR includes a link to the issue that I am addressing

Solution Description

Extending the explode function to work for nested frame.

Currently, the function only support single nested column explosion. If the given column includes multiple nested columns or includes a mix of nested column and base column, an ValueError will be raised. The exploded nest columns will be added to the right of the rest of the frame with a join. Nested column names are prefixed with <nested_col>. for clarity.

Apply the super().explode() on base columns for regular pandas' explode.

Code Quality

  • I have read the Contribution Guide
  • My code follows the code style of this project
  • My code builds (or compiles) cleanly without any errors or warnings
  • My code contains relevant comments and necessary documentation

Project-Specific Pull Request Checklists

New Feature Checklist

  • I have added or updated the docstrings associated with my feature using the NumPy docstring format
  • I have updated the tutorial to highlight my new feature (if appropriate)
  • I have added unit/End-to-End (E2E) test cases to cover my new feature
  • My change includes a breaking change
    • My change includes backwards compatibility and deprecation warnings (if possible)

Copy link

codecov bot commented Aug 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.10%. Comparing base (f28da17) to head (1a356a2).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #327      +/-   ##
==========================================
+ Coverage   98.08%   98.10%   +0.02%     
==========================================
  Files          18       18              
  Lines        1722     1742      +20     
==========================================
+ Hits         1689     1709      +20     
  Misses         33       33              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

github-actions bot commented Aug 14, 2025

Before [4186d56] <v0.4.8> After [6726d82] Ratio Benchmark (Parameter)
898M 1.02G 1.13 benchmarks.ReadFewColumnsS3.peakmem_run
10.8±0.2ms 11.5±0.3ms 1.07 benchmarks.NestedFrameAddNested.time_run
32.4±0.4ms 33.5±1ms 1.03 benchmarks.AssignSingleDfToNestedSeries.time_run
250M 249M 1 benchmarks.AssignSingleDfToNestedSeries.peakmem_run
135M 135M 1 benchmarks.CountNestedBy.peakmem_run
102M 102M 1 benchmarks.NestedFrameAddNested.peakmem_run
107M 106M 1 benchmarks.NestedFrameQuery.peakmem_run
10.2±0.05ms 10.3±0.1ms 1 benchmarks.NestedFrameQuery.time_run
105M 105M 1 benchmarks.NestedFrameReduce.peakmem_run
2.73±0.04s 2.72±0.03s 1 benchmarks.ReadFewColumnsHTTPS.time_run

Click here to view all benchmarks.

Copy link
Collaborator

@dougbrn dougbrn left a comment

Choose a reason for hiding this comment

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

Looks good, just two requests!

@Graciaaa3 Graciaaa3 requested a review from dougbrn August 14, 2025 18:56
@Graciaaa3 Graciaaa3 marked this pull request as ready for review August 14, 2025 19:31
Copy link
Collaborator

@dougbrn dougbrn left a comment

Choose a reason for hiding this comment

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

Looks great!

Copy link
Contributor

@gitosaurus gitosaurus left a comment

Choose a reason for hiding this comment

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

Looks great! Only minor suggestions on wording in the docstring.

@Graciaaa3 Graciaaa3 merged commit 6158e29 into main Aug 14, 2025
10 checks passed
@Graciaaa3 Graciaaa3 deleted the explode branch August 14, 2025 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants