Skip to content

Conversation

@wilsonbb
Copy link
Contributor

@wilsonbb wilsonbb commented Apr 15, 2025

Fixes #223

Adds nest_lists which, similar to from_lists, allows to specify a set of columns which contain list-values. These list columns are then packed into a new specified nested column within a resulting NestedFrame. The original columns are of course dropped.

While from_lists is a static constructor method, here we allow f

Some additional checks are added to allow for the method to not fail on an empty dataframe and to have more explicit failure messages for columns that do not contain list-values.

Change Description

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

Solution Description

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)

Documentation Change Checklist

@codecov
Copy link

codecov bot commented Apr 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.27%. Comparing base (f30d2da) to head (788e383).
Report is 168 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #239      +/-   ##
==========================================
+ Coverage   98.26%   98.27%   +0.01%     
==========================================
  Files          14       14              
  Lines        1271     1279       +8     
==========================================
+ Hits         1249     1257       +8     
  Misses         22       22              

☔ 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.

@github-actions
Copy link

github-actions bot commented Apr 15, 2025

Before [f30d2da] After [c41e6e5] Ratio Benchmark (Parameter)
31.8±5ms 38.9±7ms ~1.22 benchmarks.ReassignHalfOfNestedSeries.time_run
9.60±0.07ms 10.2±0.2ms 1.06 benchmarks.NestedFrameAddNested.time_run
24.9±0.7ms 25.6±0.2ms 1.03 benchmarks.AssignSingleDfToNestedSeries.time_run
1.27±0.01ms 1.29±0.02ms 1.02 benchmarks.NestedFrameReduce.time_run
270M 270M 1.00 benchmarks.AssignSingleDfToNestedSeries.peakmem_run
92.1M 92.2M 1.00 benchmarks.NestedFrameAddNested.peakmem_run
96.7M 96.7M 1.00 benchmarks.NestedFrameQuery.peakmem_run
10.7±0.07ms 10.7±0.1ms 1.00 benchmarks.NestedFrameQuery.time_run
95.8M 95.8M 1.00 benchmarks.NestedFrameReduce.peakmem_run
289M 289M 1.00 benchmarks.ReassignHalfOfNestedSeries.peakmem_run

Click here to view all benchmarks.

@wilsonbb wilsonbb marked this pull request as ready for review April 15, 2025 23:52
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.

This looks good, thank you! I just have one main question

@wilsonbb wilsonbb merged commit 0dabaff into main Apr 16, 2025
11 checks passed
@wilsonbb wilsonbb deleted the nest_lists branch April 16, 2025 20:49
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.

Add nest_lists function to NestedFrame API

2 participants