Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions pandas-stubs/core/frame.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
def groupby( # pyright: ignore reportOverlappingOverload
self,
by: Scalar,
axis: AxisIndex | _NoDefaultDoNotUse = ...,
level: IndexLabel | None = ...,
as_index: Literal[True] = True,
sort: _bool = ...,
Expand All @@ -1160,7 +1159,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
def groupby(
self,
by: Scalar,
axis: AxisIndex | _NoDefaultDoNotUse = ...,
level: IndexLabel | None = ...,
as_index: Literal[False] = ...,
sort: _bool = ...,
Expand All @@ -1172,7 +1170,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
def groupby( # pyright: ignore reportOverlappingOverload
self,
by: DatetimeIndex,
axis: AxisIndex | _NoDefaultDoNotUse = ...,
level: IndexLabel | None = ...,
as_index: Literal[True] = True,
sort: _bool = ...,
Expand All @@ -1184,7 +1181,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
def groupby( # pyright: ignore reportOverlappingOverload
self,
by: DatetimeIndex,
axis: AxisIndex | _NoDefaultDoNotUse = ...,
level: IndexLabel | None = ...,
as_index: Literal[False] = ...,
sort: _bool = ...,
Expand All @@ -1196,7 +1192,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
def groupby( # pyright: ignore reportOverlappingOverload
self,
by: TimedeltaIndex,
axis: AxisIndex | _NoDefaultDoNotUse = ...,
level: IndexLabel | None = ...,
as_index: Literal[True] = True,
sort: _bool = ...,
Expand All @@ -1208,7 +1203,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
def groupby(
self,
by: TimedeltaIndex,
axis: AxisIndex | _NoDefaultDoNotUse = ...,
level: IndexLabel | None = ...,
as_index: Literal[False] = ...,
sort: _bool = ...,
Expand All @@ -1220,7 +1214,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
def groupby( # pyright: ignore reportOverlappingOverload
self,
by: PeriodIndex,
axis: AxisIndex | _NoDefaultDoNotUse = ...,
level: IndexLabel | None = ...,
as_index: Literal[True] = True,
sort: _bool = ...,
Expand All @@ -1232,7 +1225,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
def groupby(
self,
by: PeriodIndex,
axis: AxisIndex | _NoDefaultDoNotUse = ...,
level: IndexLabel | None = ...,
as_index: Literal[False] = ...,
sort: _bool = ...,
Expand All @@ -1244,7 +1236,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
def groupby( # pyright: ignore reportOverlappingOverload
self,
by: IntervalIndex[IntervalT],
axis: AxisIndex | _NoDefaultDoNotUse = ...,
level: IndexLabel | None = ...,
as_index: Literal[True] = True,
sort: _bool = ...,
Expand All @@ -1256,7 +1247,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
def groupby(
self,
by: IntervalIndex[IntervalT],
axis: AxisIndex | _NoDefaultDoNotUse = ...,
level: IndexLabel | None = ...,
as_index: Literal[False] = ...,
sort: _bool = ...,
Expand All @@ -1268,7 +1258,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
def groupby( # type: ignore[overload-overlap] # pyright: ignore reportOverlappingOverload
self,
by: MultiIndex | GroupByObjectNonScalar | None = ...,
axis: AxisIndex | _NoDefaultDoNotUse = ...,
level: IndexLabel | None = ...,
as_index: Literal[True] = True,
sort: _bool = ...,
Expand All @@ -1280,7 +1269,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
def groupby( # type: ignore[overload-overlap]
self,
by: MultiIndex | GroupByObjectNonScalar | None = ...,
axis: AxisIndex | _NoDefaultDoNotUse = ...,
level: IndexLabel | None = ...,
as_index: Literal[False] = ...,
sort: _bool = ...,
Expand All @@ -1292,7 +1280,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
def groupby( # pyright: ignore reportOverlappingOverload
self,
by: Series[SeriesByT],
axis: AxisIndex | _NoDefaultDoNotUse = ...,
level: IndexLabel | None = ...,
as_index: Literal[True] = True,
sort: _bool = ...,
Expand All @@ -1304,7 +1291,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
def groupby(
self,
by: Series[SeriesByT],
axis: AxisIndex | _NoDefaultDoNotUse = ...,
level: IndexLabel | None = ...,
as_index: Literal[False] = ...,
sort: _bool = ...,
Expand All @@ -1316,7 +1302,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
def groupby(
self,
by: CategoricalIndex | Index | Series,
axis: AxisIndex | _NoDefaultDoNotUse = ...,
level: IndexLabel | None = ...,
as_index: Literal[True] = True,
sort: _bool = ...,
Expand All @@ -1328,7 +1313,6 @@ class DataFrame(NDFrame, OpsMixin, _GetItemHack):
def groupby(
self,
by: CategoricalIndex | Index | Series,
axis: AxisIndex | _NoDefaultDoNotUse = ...,
level: IndexLabel | None = ...,
as_index: Literal[False] = ...,
sort: _bool = ...,
Expand Down
6 changes: 0 additions & 6 deletions tests/test_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,9 +688,6 @@ def test_types_mean() -> None:
assert_type(df.mean(axis=1, skipna=True, numeric_only=False), pd.Series),
pd.Series,
)
if TYPE_CHECKING_INVALID_USAGE:
df3: pd.DataFrame = df.groupby(axis=1, level=0).mean() # type: ignore[call-overload] # pyright: ignore[reportArgumentType, reportCallIssue]
df4: pd.DataFrame = df.groupby(axis=1, level=0, dropna=True).mean() # type: ignore[call-overload] # pyright: ignore[reportArgumentType, reportCallIssue]


def test_types_median() -> None:
Expand All @@ -702,9 +699,6 @@ def test_types_median() -> None:
assert_type(df.median(axis=1, skipna=True, numeric_only=False), pd.Series),
pd.Series,
)
if TYPE_CHECKING_INVALID_USAGE:
df3: pd.DataFrame = df.groupby(axis=1, level=0).median() # type: ignore[call-overload] # pyright: ignore[reportArgumentType, reportCallIssue]
df4: pd.DataFrame = df.groupby(axis=1, level=0, dropna=True).median() # type: ignore[call-overload] # pyright: ignore[reportArgumentType, reportCallIssue]


def test_types_iterrows() -> None:
Expand Down
Loading