Skip to content

Commit cf6eab6

Browse files
authored
rename get_rows to take (#339)
* rename get_rows to gather * rename to take instead
1 parent f57f47a commit cf6eab6

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

spec/API_specification/dataframe_api/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,6 @@ def unique_indices(*columns: Column, skip_nulls: bool = True) -> Column:
413413
If the original column(s) contain multiple `'NaN'` values, then
414414
only a single index corresponding to those values will be returned.
415415
Likewise for null values (if ``skip_nulls=False``).
416-
To get the unique values, you can do ``df.get_rows(df.unique_indices(keys))``.
416+
To get the unique values, you can do ``df.take(df.unique_indices(keys))``.
417417
"""
418418
...

spec/API_specification/dataframe_api/column_object.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def dtype(self) -> DType:
106106
"""Return data type of column."""
107107
...
108108

109-
def get_rows(self, indices: Self) -> Self:
109+
def take(self, indices: Self) -> Self:
110110
"""Select a subset of rows, similar to `ndarray.take`.
111111
112112
Parameters
@@ -867,7 +867,7 @@ def unique_indices(self, *, skip_nulls: bool | Scalar = True) -> Self:
867867
If the original Column contains multiple `'NaN'` values, then
868868
only a single index corresponding to those values will be returned.
869869
Likewise for null values (if ``skip_nulls=False``).
870-
To get the unique values, you can do ``col.get_rows(col.unique_indices())``.
870+
To get the unique values, you can do ``col.take(col.unique_indices())``.
871871
"""
872872
...
873873

spec/API_specification/dataframe_api/dataframe_object.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def select(self, *names: str) -> Self:
132132
"""
133133
...
134134

135-
def get_rows(self, indices: Column) -> Self:
135+
def take(self, indices: Column) -> Self:
136136
"""Select a subset of rows, similar to `ndarray.take`.
137137
138138
Parameters

0 commit comments

Comments
 (0)