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

rename get_rows to take #339

Merged
merged 2 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion spec/API_specification/dataframe_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,6 @@ def unique_indices(*columns: Column, skip_nulls: bool = True) -> Column:
If the original column(s) contain multiple `'NaN'` values, then
only a single index corresponding to those values will be returned.
Likewise for null values (if ``skip_nulls=False``).
To get the unique values, you can do ``df.get_rows(df.unique_indices(keys))``.
To get the unique values, you can do ``df.gather(df.unique_indices(keys))``.
"""
...
4 changes: 2 additions & 2 deletions spec/API_specification/dataframe_api/column_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def dtype(self) -> DType:
"""Return data type of column."""
...

def get_rows(self, indices: Self) -> Self:
def gather(self, indices: Self) -> Self:
"""Select a subset of rows, similar to `ndarray.take`.

Parameters
Expand Down Expand Up @@ -856,7 +856,7 @@ def unique_indices(self, *, skip_nulls: bool | Scalar = True) -> Self:
If the original Column contains multiple `'NaN'` values, then
only a single index corresponding to those values will be returned.
Likewise for null values (if ``skip_nulls=False``).
To get the unique values, you can do ``col.get_rows(col.unique_indices())``.
To get the unique values, you can do ``col.gather(col.unique_indices())``.
"""
...

Expand Down
2 changes: 1 addition & 1 deletion spec/API_specification/dataframe_api/dataframe_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def select(self, *names: str) -> Self:
"""
...

def get_rows(self, indices: Column) -> Self:
def gather(self, indices: Column) -> Self:
"""Select a subset of rows, similar to `ndarray.take`.

Parameters
Expand Down