Skip to content

Conversation

@dougbrn
Copy link
Collaborator

@dougbrn dougbrn commented Aug 18, 2025

Resolves #304. This PR has gotten large enough that it might have been better to split it up into a few smaller steps, sorry about that. I've yet to write documentation, but I think it makes sense to write it as a follow up PR while we iron out any implementation/api behaviors here.

Some design choices I made here, which we can definitely do differently:

  • NestedSeries takes on a set of the nest accessor functions for direct use
  • NestedSeries works with non-nested dtypes just as a normal pandas series, but nested specific properties/methods are tagged with a decorator which will throw an exception for attempted use with a non-nested dtype
  • When returning a non-nested series, still try to return a native pandas series. Don't use NestedSeries as an everywhere replacement for pandas series when it's not needed.
  • For masking, return result as a NestedSeries always, instead of sometimes as a NestedFrame

@github-actions
Copy link

github-actions bot commented Aug 18, 2025

Before [919fe82] After [8b9c68f] Ratio Benchmark (Parameter)
1.21±0.02ms 1.34±0ms 1.1 benchmarks.NestedFrameReduce.time_run
705±10ms 745±100ms 1.06 benchmarks.ReadFewColumnsS3.time_run
10.9±0.03ms 11.4±0.2ms 1.05 benchmarks.NestedFrameAddNested.time_run
10.5±0.1ms 10.8±0.1ms 1.02 benchmarks.NestedFrameQuery.time_run
64.8±0.3ms 65.5±0.9ms 1.01 benchmarks.CountNestedBy.time_run
177M 179M 1.01 benchmarks.ReadFewColumnsHTTPS.peakmem_run
250M 250M 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

Click here to view all benchmarks.

@codecov
Copy link

codecov bot commented Aug 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.19%. Comparing base (46acb8e) to head (adc5874).
⚠️ Report is 145 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #331      +/-   ##
==========================================
+ Coverage   98.11%   98.19%   +0.08%     
==========================================
  Files          18       19       +1     
  Lines        1748     1830      +82     
==========================================
+ Hits         1715     1797      +82     
  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.

@dougbrn dougbrn changed the title [WIP] NestedSeries Implementation NestedSeries Implementation Aug 20, 2025
@dougbrn dougbrn marked this pull request as ready for review August 20, 2025 17:11
@dougbrn dougbrn requested review from gitosaurus and hombit August 20, 2025 17:22
Copy link
Collaborator

@hombit hombit 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, thank you!

@dougbrn dougbrn requested a review from gitosaurus August 25, 2025 20:39
@dougbrn dougbrn mentioned this pull request Aug 26, 2025
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.

LGTM!

@dougbrn dougbrn merged commit cf6d152 into main Aug 26, 2025
11 checks passed
@dougbrn dougbrn deleted the init_nestedseries branch August 26, 2025 17:27
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.

Implement NestedSeries

4 participants