|
7 | 7 | from typing import Literal |
8 | 8 |
|
9 | 9 | from narwhals.spec import DataFrame as DataFrameT |
10 | | -from narwhals.spec import GroupBy as GroupByT |
11 | 10 | from narwhals.spec import IntoExpr |
12 | 11 | from narwhals.spec import LazyFrame as LazyFrameProtocol |
13 | | -from narwhals.spec import LazyGroupBy as LazyGroupByT |
14 | 12 | from narwhals.spec import Namespace as NamespaceProtocol |
15 | 13 | from narwhals.utils import evaluate_into_exprs |
16 | 14 | from narwhals.utils import flatten_str |
|
22 | 20 |
|
23 | 21 | from typing_extensions import Self |
24 | 22 |
|
| 23 | + from narwhals.pandas_like.group_by_object import GroupBy |
| 24 | + from narwhals.pandas_like.group_by_object import LazyGroupBy |
25 | 25 | from narwhals.pandas_like.namespace import Namespace |
26 | 26 |
|
27 | 27 |
|
@@ -97,7 +97,7 @@ def __dataframe_namespace__( |
97 | 97 | def shape(self) -> tuple[int, int]: |
98 | 98 | return self.dataframe.shape # type: ignore[no-any-return] |
99 | 99 |
|
100 | | - def group_by(self, *keys: str | Iterable[str]) -> GroupByT: |
| 100 | + def group_by(self, *keys: str | Iterable[str]) -> GroupBy: |
101 | 101 | from narwhals.pandas_like.group_by_object import GroupBy |
102 | 102 |
|
103 | 103 | return GroupBy(self, flatten_str(*keys), api_version=self.api_version) |
@@ -244,7 +244,7 @@ def __lazyframe_namespace__( |
244 | 244 | implementation=self._implementation, # type: ignore[attr-defined] |
245 | 245 | ) |
246 | 246 |
|
247 | | - def group_by(self, *keys: str | Iterable[str]) -> LazyGroupByT: |
| 247 | + def group_by(self, *keys: str | Iterable[str]) -> LazyGroupBy: |
248 | 248 | from narwhals.pandas_like.group_by_object import LazyGroupBy |
249 | 249 |
|
250 | 250 | return LazyGroupBy(self, flatten_str(*keys), api_version=self.api_version) |
|
0 commit comments