Skip to content

Commit

Permalink
type frame.py & series.py
Browse files Browse the repository at this point in the history
  • Loading branch information
topper-123 committed Mar 13, 2023
1 parent a412ef2 commit 86b5fad
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
4 changes: 2 additions & 2 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2492,7 +2492,7 @@ def _from_arrays(
index,
dtype: Dtype | None = None,
verify_integrity: bool = True,
) -> DataFrame:
) -> Self:
"""
Create DataFrame from a list of arrays corresponding to the columns.
Expand Down Expand Up @@ -4591,7 +4591,7 @@ def eval(self, expr: str, *, inplace: bool = False, **kwargs) -> Any | None:

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

def select_dtypes(self, include=None, exclude=None) -> DataFrame:
def select_dtypes(self, include=None, exclude=None) -> Self:
"""
Return a subset of the DataFrame's columns based on the column dtypes.
Expand Down
13 changes: 0 additions & 13 deletions pandas/core/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -3897,19 +3897,6 @@ class max_speed

nv.validate_take((), kwargs)

return self._take(indices, axis)

def _take(
self,
indices,
axis: Axis = 0,
convert_indices: bool_t = True,
) -> Self:
"""
Internal version of the `take` allowing specification of additional args.
See the docstring of `take` for full explanation of the parameters.
"""
if not isinstance(indices, slice):
indices = np.asarray(indices, dtype=np.intp)
if (
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -4277,7 +4277,7 @@ def map(
self, method="map"
)

def _gotitem(self, key, ndim, subset=None) -> Series:
def _gotitem(self, key, ndim, subset=None) -> Self:
"""
Sub-classes to define. Return a sliced object.
Expand Down

0 comments on commit 86b5fad

Please sign in to comment.