Skip to content

Commit 86b5fad

Browse files
committed
type frame.py & series.py
1 parent a412ef2 commit 86b5fad

File tree

3 files changed

+3
-16
lines changed

3 files changed

+3
-16
lines changed

pandas/core/frame.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2492,7 +2492,7 @@ def _from_arrays(
24922492
index,
24932493
dtype: Dtype | None = None,
24942494
verify_integrity: bool = True,
2495-
) -> DataFrame:
2495+
) -> Self:
24962496
"""
24972497
Create DataFrame from a list of arrays corresponding to the columns.
24982498
@@ -4591,7 +4591,7 @@ def eval(self, expr: str, *, inplace: bool = False, **kwargs) -> Any | None:
45914591

45924592
return _eval(expr, inplace=inplace, **kwargs)
45934593

4594-
def select_dtypes(self, include=None, exclude=None) -> DataFrame:
4594+
def select_dtypes(self, include=None, exclude=None) -> Self:
45954595
"""
45964596
Return a subset of the DataFrame's columns based on the column dtypes.
45974597

pandas/core/generic.py

-13
Original file line numberDiff line numberDiff line change
@@ -3897,19 +3897,6 @@ class max_speed
38973897

38983898
nv.validate_take((), kwargs)
38993899

3900-
return self._take(indices, axis)
3901-
3902-
def _take(
3903-
self,
3904-
indices,
3905-
axis: Axis = 0,
3906-
convert_indices: bool_t = True,
3907-
) -> Self:
3908-
"""
3909-
Internal version of the `take` allowing specification of additional args.
3910-
3911-
See the docstring of `take` for full explanation of the parameters.
3912-
"""
39133900
if not isinstance(indices, slice):
39143901
indices = np.asarray(indices, dtype=np.intp)
39153902
if (

pandas/core/series.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4277,7 +4277,7 @@ def map(
42774277
self, method="map"
42784278
)
42794279

4280-
def _gotitem(self, key, ndim, subset=None) -> Series:
4280+
def _gotitem(self, key, ndim, subset=None) -> Self:
42814281
"""
42824282
Sub-classes to define. Return a sliced object.
42834283

0 commit comments

Comments
 (0)