Skip to content

Commit a3b27bf

Browse files
committed
wip
1 parent edc928b commit a3b27bf

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

narwhals/pandas_like/dataframe.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
from typing import Literal
88

99
from narwhals.spec import DataFrame as DataFrameT
10-
from narwhals.spec import GroupBy as GroupByT
1110
from narwhals.spec import IntoExpr
1211
from narwhals.spec import LazyFrame as LazyFrameProtocol
13-
from narwhals.spec import LazyGroupBy as LazyGroupByT
1412
from narwhals.spec import Namespace as NamespaceProtocol
1513
from narwhals.utils import evaluate_into_exprs
1614
from narwhals.utils import flatten_str
@@ -22,6 +20,8 @@
2220

2321
from typing_extensions import Self
2422

23+
from narwhals.pandas_like.group_by_object import GroupBy
24+
from narwhals.pandas_like.group_by_object import LazyGroupBy
2525
from narwhals.pandas_like.namespace import Namespace
2626

2727

@@ -97,7 +97,7 @@ def __dataframe_namespace__(
9797
def shape(self) -> tuple[int, int]:
9898
return self.dataframe.shape # type: ignore[no-any-return]
9999

100-
def group_by(self, *keys: str | Iterable[str]) -> GroupByT:
100+
def group_by(self, *keys: str | Iterable[str]) -> GroupBy:
101101
from narwhals.pandas_like.group_by_object import GroupBy
102102

103103
return GroupBy(self, flatten_str(*keys), api_version=self.api_version)
@@ -244,7 +244,7 @@ def __lazyframe_namespace__(
244244
implementation=self._implementation, # type: ignore[attr-defined]
245245
)
246246

247-
def group_by(self, *keys: str | Iterable[str]) -> LazyGroupByT:
247+
def group_by(self, *keys: str | Iterable[str]) -> LazyGroupBy:
248248
from narwhals.pandas_like.group_by_object import LazyGroupBy
249249

250250
return LazyGroupBy(self, flatten_str(*keys), api_version=self.api_version)

narwhals/pandas_like/group_by_object.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
from narwhals.pandas_like.dataframe import LazyFrame
88
from narwhals.spec import DataFrame as DataFrameT
9-
from narwhals.spec import GroupBy as GroupByT
9+
from narwhals.spec import GroupBy as GroupByProtocol
1010
from narwhals.spec import IntoExpr
1111
from narwhals.spec import LazyFrame as LazyFrameProtocol
1212
from narwhals.spec import LazyGroupBy as LazyGroupByT
@@ -18,7 +18,7 @@
1818
from narwhals.utils import parse_into_exprs
1919

2020

21-
class GroupBy(GroupByT):
21+
class GroupBy(GroupByProtocol):
2222
def __init__(self, df: DataFrameT, keys: list[str], api_version: str) -> None:
2323
self._df = df
2424
self._keys = list(keys)

0 commit comments

Comments
 (0)