Skip to content

DataFrame.get_rows should take Column, not Sequence #147

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

Merged
merged 3 commits into from
Apr 26, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions spec/API_specification/dataframe_api/dataframe_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,24 +88,18 @@ def get_columns_by_name(self, names: Sequence[str], /) -> DataFrame:
"""
...

def get_rows(self, indices: Sequence[int]) -> DataFrame:
def get_rows(self, indices: "Column[int]") -> DataFrame:
"""
Select a subset of rows, similar to `ndarray.take`.

Parameters
----------
indices : Sequence[int]
indices : Column
Positions of rows to select.

Returns
-------
DataFrame

Notes
-----
Some discussion participants prefer a stricter type Column[int] for
indices in order to make it easier to implement in a performant manner
on GPUs.
"""
...

Expand Down