-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fixes for accessor mapping methods #91
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #91 +/- ##
==========================================
+ Coverage 98.71% 98.76% +0.04%
==========================================
Files 15 15
Lines 859 888 +29
==========================================
+ Hits 848 877 +29
Misses 11 11 ☔ View full report in Codecov by Sentry. |
Click here to view all benchmarks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
This PR addresses issue #87 and removes most of the in-place modification methods from the
NestedAccessor
. The problem with field modification was thatpd.Series.dtype
would not update after changing the underlyingNestedAccessor.dtype
. The only modification we can still perform through the accessor interface is changing the field (subcolumn) data without altering its dtype.Note: When I mention "in-place" here, I don't mean that we do not copy data — we do copy the arrays we modify. However, this process is transparent from the user's and
pd.Series
's point of view. Therefore, we are effectively changingpd.Series
in-place, while the underlying memory blobs remain immutable.It also fixes #62, because we wouldn't have both methods anymore.