Skip to content

Commit

Permalink
wip typing
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed Feb 21, 2024
1 parent 6b1cde0 commit 8cd648b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions narwhals/spec/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,23 +162,23 @@ def to_pandas(self) -> Any:
class DataFrame(Protocol):
def with_columns(
self, *exprs: IntoExpr | Iterable[IntoExpr], **named_exprs: IntoExpr
) -> DataFrame:
) -> Self:
...

def filter(self, *predicates: IntoExpr | Iterable[IntoExpr]) -> DataFrame:
def filter(self, *predicates: IntoExpr | Iterable[IntoExpr]) -> Self:
...

def select(
self, *exprs: IntoExpr | Iterable[IntoExpr], **named_exprs: IntoExpr
) -> DataFrame:
) -> Self:
...

def sort(
self,
by: str | Iterable[str],
*more_by: str,
descending: bool | Iterable[bool] = False,
) -> DataFrame:
) -> Self:
...

def group_by(self, *keys: str | Iterable[str]) -> GroupBy:
Expand All @@ -194,24 +194,24 @@ def join(
how: Literal["inner"] = "inner",
left_on: str | list[str],
right_on: str | list[str],
) -> DataFrame:
) -> Self:
...

@property
def columns(self) -> list[str]:
...

def head(self, n: int) -> DataFrame:
def head(self, n: int) -> Self:
...

def unique(self, subset: list[str]) -> DataFrame:
def unique(self, subset: list[str]) -> Self:
...

@property
def shape(self) -> tuple[int, int]:
...

def rename(self, mapping: dict[str, str]) -> DataFrame:
def rename(self, mapping: dict[str, str]) -> Self:
...

def to_numpy(self) -> Any:
Expand Down

0 comments on commit 8cd648b

Please sign in to comment.