Skip to content

Commit 2acecd7

Browse files
authored
remove several unnecessary definitions in generic.pyi (#1128)
1 parent 757e34e commit 2acecd7

File tree

1 file changed

+0
-165
lines changed

1 file changed

+0
-165
lines changed

pandas-stubs/core/generic.pyi

Lines changed: 0 additions & 165 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,13 @@ from typing_extensions import (
2929
from pandas._libs.lib import NoDefault
3030
from pandas._typing import (
3131
S1,
32-
ArrayLike,
3332
Axis,
34-
AxisIndex,
3533
CompressionOptions,
3634
CSVQuoting,
3735
DtypeArg,
3836
DtypeBackend,
3937
FilePath,
4038
FileWriteMode,
41-
FillnaOptions,
4239
Frequency,
4340
HashableT1,
4441
HashableT2,
@@ -47,8 +44,6 @@ from pandas._typing import (
4744
IndexLabel,
4845
Level,
4946
P,
50-
ReplaceMethod,
51-
SortKind,
5247
StorageOptions,
5348
T,
5449
TimedeltaConvertibleTypes,
@@ -80,13 +75,9 @@ class NDFrame(indexing.IndexingMixin):
8075
@property
8176
def shape(self) -> tuple[int, ...]: ...
8277
@property
83-
def axes(self) -> list[Index]: ...
84-
@property
8578
def ndim(self) -> int: ...
8679
@property
8780
def size(self) -> int: ...
88-
def droplevel(self, level: Level, axis: AxisIndex = ...) -> Self: ...
89-
def squeeze(self, axis=...): ...
9081
def equals(self, other: Series[S1]) -> _bool: ...
9182
def __neg__(self) -> Self: ...
9283
def __pos__(self) -> Self: ...
@@ -95,8 +86,6 @@ class NDFrame(indexing.IndexingMixin):
9586
def bool(self) -> _bool: ...
9687
def __abs__(self) -> Self: ...
9788
def __round__(self, decimals: int = ...) -> Self: ...
98-
def keys(self): ...
99-
def __len__(self) -> int: ...
10089
def __contains__(self, key) -> _bool: ...
10190
@property
10291
def empty(self) -> _bool: ...
@@ -292,7 +281,6 @@ class NDFrame(indexing.IndexingMixin):
292281
errors: _str = ...,
293282
storage_options: StorageOptions = ...,
294283
) -> _str: ...
295-
def take(self, indices, axis=..., **kwargs) -> Self: ...
296284
def __delitem__(self, idx: Hashable) -> None: ...
297285
@overload
298286
def drop(
@@ -366,43 +354,6 @@ class NDFrame(indexing.IndexingMixin):
366354
inplace: Literal[False] = ...,
367355
errors: IgnoreRaise = ...,
368356
) -> Self: ...
369-
def add_prefix(self, prefix: _str) -> Self: ...
370-
def add_suffix(self, suffix: _str) -> Self: ...
371-
@overload
372-
def sort_index(
373-
self,
374-
*,
375-
axis: Axis = ...,
376-
level=...,
377-
ascending: _bool = ...,
378-
inplace: Literal[True],
379-
kind: SortKind = ...,
380-
na_position: Literal["first", "last"] = ...,
381-
sort_remaining: _bool = ...,
382-
ignore_index: _bool = ...,
383-
) -> None: ...
384-
@overload
385-
def sort_index(
386-
self,
387-
*,
388-
axis: Axis = ...,
389-
level=...,
390-
ascending: _bool = ...,
391-
inplace: Literal[False] = ...,
392-
kind: SortKind = ...,
393-
na_position: Literal["first", "last"] = ...,
394-
sort_remaining: _bool = ...,
395-
ignore_index: _bool = ...,
396-
) -> Self: ...
397-
def filter(
398-
self,
399-
items=...,
400-
like: _str | None = ...,
401-
regex: _str | None = ...,
402-
axis=...,
403-
) -> Self: ...
404-
def head(self, n: int = ...) -> Self: ...
405-
def tail(self, n: int = ...) -> Self: ...
406357
@overload
407358
def pipe(
408359
self,
@@ -419,14 +370,8 @@ class NDFrame(indexing.IndexingMixin):
419370
) -> T: ...
420371
def __finalize__(self, other, method=..., **kwargs) -> Self: ...
421372
def __setattr__(self, name: _str, value) -> None: ...
422-
@property
423-
def values(self) -> ArrayLike: ...
424-
@property
425-
def dtypes(self): ...
426-
def copy(self, deep: _bool = ...) -> Self: ...
427373
def __copy__(self, deep: _bool = ...) -> Self: ...
428374
def __deepcopy__(self, memo=...) -> Self: ...
429-
def infer_objects(self) -> Self: ...
430375
def convert_dtypes(
431376
self,
432377
infer_objects: _bool = ...,
@@ -436,56 +381,6 @@ class NDFrame(indexing.IndexingMixin):
436381
convert_floating: _bool = ...,
437382
dtype_backend: DtypeBackend = ...,
438383
) -> Self: ...
439-
@overload
440-
def replace(
441-
self,
442-
to_replace=...,
443-
value=...,
444-
*,
445-
inplace: Literal[True],
446-
limit=...,
447-
regex: _bool = ...,
448-
method: ReplaceMethod = ...,
449-
) -> None: ...
450-
@overload
451-
def replace(
452-
self,
453-
to_replace=...,
454-
value=...,
455-
*,
456-
inplace: Literal[False] = ...,
457-
limit=...,
458-
regex: _bool = ...,
459-
method: ReplaceMethod = ...,
460-
) -> NDFrame: ...
461-
def asof(self, where, subset=...): ...
462-
def isna(self) -> NDFrame: ...
463-
def isnull(self) -> NDFrame: ...
464-
def notna(self) -> NDFrame: ...
465-
def notnull(self) -> NDFrame: ...
466-
@overload
467-
def clip(
468-
self, lower=..., upper=..., *, axis=..., inplace: Literal[True], **kwargs
469-
) -> None: ...
470-
@overload
471-
def clip(
472-
self, lower=..., upper=..., *, axis=..., inplace: Literal[False] = ..., **kwargs
473-
) -> Self: ...
474-
def asfreq(
475-
self,
476-
freq,
477-
method: FillnaOptions | None = ...,
478-
how: Literal["start", "end"] | None = ...,
479-
normalize: _bool = ...,
480-
fill_value=...,
481-
) -> Self: ...
482-
def at_time(self, time, asof: _bool = ..., axis=...) -> Self: ...
483-
def between_time(
484-
self,
485-
start_time,
486-
end_time,
487-
axis=...,
488-
) -> Self: ...
489384
@final
490385
def resample(
491386
self,
@@ -501,63 +396,3 @@ class NDFrame(indexing.IndexingMixin):
501396
offset: TimedeltaConvertibleTypes | None = ...,
502397
group_keys: _bool = ...,
503398
) -> DatetimeIndexResampler[Self]: ...
504-
def first(self, offset) -> Self: ...
505-
def last(self, offset) -> Self: ...
506-
def rank(
507-
self,
508-
axis=...,
509-
method: Literal["average", "min", "max", "first", "dense"] = ...,
510-
numeric_only: _bool = ...,
511-
na_option: Literal["keep", "top", "bottom"] = ...,
512-
ascending: _bool = ...,
513-
pct: _bool = ...,
514-
) -> NDFrame: ...
515-
@overload
516-
def where(
517-
self,
518-
cond,
519-
other=...,
520-
*,
521-
inplace: Literal[True],
522-
axis=...,
523-
level=...,
524-
) -> None: ...
525-
@overload
526-
def where(
527-
self,
528-
cond,
529-
other=...,
530-
*,
531-
inplace: Literal[False] = ...,
532-
axis=...,
533-
level=...,
534-
) -> Self: ...
535-
@overload
536-
def mask(
537-
self,
538-
cond,
539-
other=...,
540-
*,
541-
inplace: Literal[True],
542-
axis=...,
543-
level=...,
544-
) -> None: ...
545-
@overload
546-
def mask(
547-
self,
548-
cond,
549-
other=...,
550-
*,
551-
inplace: Literal[False] = ...,
552-
axis=...,
553-
level=...,
554-
) -> Self: ...
555-
def shift(self, periods=..., freq=..., axis=..., fill_value=...) -> Self: ...
556-
def truncate(self, before=..., after=..., axis=..., copy: _bool = ...) -> Self: ...
557-
def abs(self) -> Self: ...
558-
def describe(self, percentiles=..., include=..., exclude=...) -> NDFrame: ...
559-
def pct_change(
560-
self, periods=..., fill_method=..., limit=..., freq=..., **kwargs
561-
) -> Self: ...
562-
def first_valid_index(self): ...
563-
def last_valid_index(self): ...

0 commit comments

Comments
 (0)