Skip to content

Handle Index without arguments, subclassing DataFrame and register accessor arguments #1091

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions pandas-stubs/_typing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@ T = TypeVar("T")
P = ParamSpec("P")
FuncType: TypeAlias = Callable[..., Any]
F = TypeVar("F", bound=FuncType)
TypeT = TypeVar("TypeT", bound=type)
HashableT = TypeVar("HashableT", bound=Hashable)
HashableT1 = TypeVar("HashableT1", bound=Hashable)
HashableT2 = TypeVar("HashableT2", bound=Hashable)
Expand Down
18 changes: 6 additions & 12 deletions pandas-stubs/core/accessor.pyi
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
from typing import Any
from typing import Callable

class PandasDelegate: ...

def delegate_names(
delegate: Any, accessors: Any, typ: str, overwrite: bool = ...
) -> Any: ...
from pandas._typing import TypeT

class CachedAccessor:
def __init__(self, name: str, accessor: Any) -> None: ...
def __get__(self, obj: Any, cls: Any): ...
class PandasDelegate: ...

def register_dataframe_accessor(name: Any): ...
def register_series_accessor(name: Any): ...
def register_index_accessor(name: Any): ...
def register_dataframe_accessor(name: str) -> Callable[[TypeT], TypeT]: ...
def register_series_accessor(name: str) -> Callable[[TypeT], TypeT]: ...
def register_index_accessor(name: str) -> Callable[[TypeT], TypeT]: ...
Loading
Loading