-
Notifications
You must be signed in to change notification settings - Fork 902
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
Add IndexedFrame class and move SingleColumnFrame to a separate module #9378
Add IndexedFrame class and move SingleColumnFrame to a separate module #9378
Conversation
Codecov Report
@@ Coverage Diff @@
## branch-21.12 #9378 +/- ##
==============================================
Coverage 10.79% 10.79%
==============================================
Files 116 117 +1
Lines 18869 19427 +558
==============================================
+ Hits 2036 2098 +62
- Misses 16833 17329 +496
Continue to review full report at Codecov.
|
b011d0f
to
4f1bd5d
Compare
@@ -500,95 +499,6 @@ def _explode(self, explode_column: Any, ignore_index: bool): | |||
res.index.names = self._index.names | |||
return res | |||
|
|||
def _sort_index( |
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.
An FYI for reviewers: This method is the result of a bad rebase of mine on a previous PR. It is redundant (replaced by the non-underscored sort_index
method below) and safe to remove.
caffdd9
to
3efe8a2
Compare
@gpucibot merge |
This PR adds a new IndexedFrame subclass of Frame. For the moment this is a minimal class with one user-facing method and the indexer properties, but as we make progress on #9038 we are likely to find more methods that should live here. Additionally, once we remove references to Frame and Index types from the Cython layer of cudf we will be able to move all index-related logic from Frame into this class and provide a suitable ducktyped interface for methods that need to behave differently for frames depending on whether or not they have an index.
In the process I also moved SingleColumnFrame into its own module. One class per file is a good organizational pattern, especially for huge classes like these, and it can also help reduce issues with circular imports and improve mypy runtime.