Skip to content

Conversation

@Graciaaa3
Copy link
Collaborator

Fixing the bug of NestedFrame.drop(columns=...).
Previously, when calling nf.drop(columns=...), the wrapper didn't handle the case where the columns parameter contains nested column. The function directly go to super().drop, which resulted in an error.

Change Description

closes #367

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

Solution Description

  • Added logic to treat the columns parameter as a special case that may contain nested column names.
  • Normalized columns input into (labels, axis) form before calling super().drop.
  • Left all other drop behaviors unchanged.

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

Bug Fix Checklist

  • My fix includes a new test that breaks as a result of the bug (if possible)
  • My change includes a breaking change
    • My change includes backwards compatibility and deprecation warnings (if possible)

@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.27%. Comparing base (ebe6315) to head (305040e).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #407   +/-   ##
=======================================
  Coverage   97.27%   97.27%           
=======================================
  Files          19       19           
  Lines        2089     2093    +4     
=======================================
+ Hits         2032     2036    +4     
  Misses         57       57           

☔ 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 Nov 12, 2025

Before [ebe6315] <v0.6.2> After [15fb2f8] Ratio Benchmark (Parameter)
165±40ms 190±100ms ~1.15 benchmarks.ReadFewColumnsHTTPS.time_run
2.44±0.06s 2.54±0.2s 1.04 benchmarks.ReadFewColumnsS3.time_run
10.8±0.3ms 11.1±0.2ms 1.03 benchmarks.NestedFrameAddNested.time_run
1.3G 1.32G 1.02 benchmarks.ReadFewColumnsS3.peakmem_run
257M 257M 1.00 benchmarks.AssignSingleDfToNestedSeries.peakmem_run
136M 136M 1.00 benchmarks.CountNestedBy.peakmem_run
66.0±0.8ms 66.1±0.5ms 1.00 benchmarks.CountNestedBy.time_run
103M 103M 1.00 benchmarks.NestedFrameAddNested.peakmem_run
108M 108M 1.00 benchmarks.NestedFrameQuery.peakmem_run
11.2±0.1ms 11.1±0.05ms 1.00 benchmarks.NestedFrameQuery.time_run

Click here to view all benchmarks.

@hombit
Copy link
Collaborator

hombit commented Nov 13, 2025

Is it ready to review, or still draft?

@Graciaaa3 Graciaaa3 marked this pull request as ready for review November 13, 2025 23:09
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 to me, thank you @Graciaaa3 !

@gitosaurus gitosaurus self-requested a review November 14, 2025 01:00
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!

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

@Graciaaa3 Graciaaa3 merged commit a32df9c into main Nov 14, 2025
12 checks passed
@Graciaaa3 Graciaaa3 deleted the fix-drop-nested-columns branch November 14, 2025 01:29
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.drop(columns=["nested.t"]) doesn't work

5 participants