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

Generalize some more indexed frame methods #9529

Merged

Conversation

vyasr
Copy link
Contributor

@vyasr vyasr commented Oct 26, 2021

This PR:

  1. Moves the index property into IndexedFrame
  2. Standardizes the to_dict method
  3. Adds the _dtypes property for faster access to a dictionary of dtypes in a Frame
  4. Does some internal cleanup of indexing related methods in DataFrame and Series (reindex, reset_index)
  5. Deprecates Series.set_index.
  6. Adds a test for erroneous setting an Index to a Series that doesn't match in length.

@vyasr vyasr added 3 - Ready for Review Ready for review by team Python Affects Python cuDF API. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Oct 26, 2021
@vyasr vyasr added this to the CuDF Python Refactoring milestone Oct 26, 2021
@vyasr vyasr self-assigned this Oct 26, 2021
@vyasr vyasr requested a review from a team as a code owner October 26, 2021 22:35
@codecov
Copy link

codecov bot commented Oct 27, 2021

Codecov Report

Merging #9529 (6025270) into branch-21.12 (ab4bfaa) will decrease coverage by 0.11%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff                @@
##           branch-21.12    #9529      +/-   ##
================================================
- Coverage         10.79%   10.67%   -0.12%     
================================================
  Files               116      117       +1     
  Lines             18869    19716     +847     
================================================
+ Hits               2036     2104      +68     
- Misses            16833    17612     +779     
Impacted Files Coverage Δ
python/dask_cudf/dask_cudf/sorting.py 92.90% <0.00%> (-1.21%) ⬇️
python/cudf/cudf/io/csv.py 0.00% <0.00%> (ø)
python/cudf/cudf/io/hdf.py 0.00% <0.00%> (ø)
python/cudf/cudf/io/orc.py 0.00% <0.00%> (ø)
python/cudf/cudf/__init__.py 0.00% <0.00%> (ø)
python/cudf/cudf/_version.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/abc.py 0.00% <0.00%> (ø)
python/cudf/cudf/api/types.py 0.00% <0.00%> (ø)
python/cudf/cudf/io/dlpack.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/frame.py 0.00% <0.00%> (ø)
... and 65 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ca40e18...6025270. Read the comment docs.

@vyasr
Copy link
Contributor Author

vyasr commented Oct 27, 2021

@gpucibot merge

@rapids-bot rapids-bot bot merged commit baf8275 into rapidsai:branch-21.12 Oct 27, 2021
@vyasr vyasr deleted the refactor/indexed_frame_methods branch January 14, 2022 18:01
rapids-bot bot pushed a commit that referenced this pull request Jan 26, 2022
This PR removes the deprecated method `Series.set_index`. Resolves #9541, follows up on #9529.

Authors:
  - Bradley Dice (https://github.com/bdice)
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Christopher Harris (https://github.com/cwharris)
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: #9945
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants