Skip to content

Commit 6069d72

Browse files
committed
add Expression.name
1 parent 48945e7 commit 6069d72

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

spec/API_specification/dataframe_api/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@
4444

4545
def col(name: str) -> Expression:
4646
"""
47-
Instantiate an Expression which selects given columns by name.
47+
Instantiate an Expression which selects given column by name.
4848
49-
For example, to only keep rows where column 'species' equals 'setosa', use
49+
For example, to select column 'species' and then use it to filter
50+
a DataFrame, you could do:
5051
5152
.. code-block::python
5253

spec/API_specification/dataframe_api/expression_object.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,9 @@ def __len__(self) -> Expression:
7272
Return the number of rows.
7373
"""
7474

75-
def get_rows(self: Expression, indices: Expression) -> Expression:
76-
"""
77-
Select a subset of rows, similar to `ndarray.take`.
78-
79-
Parameters
80-
----------
81-
indices : Expression
82-
Positions of rows to select.
83-
"""
84-
...
75+
@property
76+
def name(self) -> str:
77+
"""Return output name of expression."""
8578

8679
def slice_rows(
8780
self: Expression, start: int | None, stop: int | None, step: int | None

0 commit comments

Comments
 (0)