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

Fix ndf.add_nested() for empty frames #92

Merged
merged 1 commit into from
May 29, 2024
Merged

Fix ndf.add_nested() for empty frames #92

merged 1 commit into from
May 29, 2024

Conversation

hombit
Copy link
Collaborator

@hombit hombit commented May 29, 2024

Fixes #88.

This changes the implementation of NestedFrame.add_nested to use df[name] = data instead of df.assign(name=data), because the least doesn't work for empty frames. The reason we care is dask metadata

Copy link

codecov bot commented May 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.72%. Comparing base (41cce93) to head (d4eb8fc).
Report is 72 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #92   +/-   ##
=======================================
  Coverage   98.71%   98.72%           
=======================================
  Files          15       15           
  Lines         859      861    +2     
=======================================
+ Hits          848      850    +2     
  Misses         11       11           

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

Copy link

Before [41cce93] After [7d3ddf9] Ratio Benchmark (Parameter)
55.9±3ms 60.7±4ms 1.09 benchmarks.ReassignHalfOfNestedSeries.time_run
255M 257M 1.01 benchmarks.AssignSingleDfToNestedSeries.peakmem_run
272M 274M 1.01 benchmarks.ReassignHalfOfNestedSeries.peakmem_run
31.1±2ms 31.1±0.7ms 1 benchmarks.AssignSingleDfToNestedSeries.time_run
86.5M 86.6M 1 benchmarks.NestedFrameAddNested.peakmem_run
89.5M 89.4M 1 benchmarks.NestedFrameQuery.peakmem_run
89.7M 89.4M 1 benchmarks.NestedFrameReduce.peakmem_run
8.98±0.1ms 8.86±0.1ms 0.99 benchmarks.NestedFrameAddNested.time_run
5.30±0.08ms 5.17±0.09ms 0.98 benchmarks.NestedFrameReduce.time_run
6.30±0.05ms 6.11±0.02ms 0.97 benchmarks.NestedFrameQuery.time_run

Click here to view all benchmarks.

@hombit hombit requested review from dougbrn and maxwest-uw and removed request for dougbrn May 29, 2024 15:57
@hombit hombit merged commit 0ed3746 into main May 29, 2024
11 checks passed
@hombit hombit deleted the fix/issue/88 branch May 29, 2024 19:24
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.

NestedFrame.add_nested doesn't add a column for empty frames
2 participants