from pandas import Series
from pandas.core.accessor import PandasDelegate

class BaseAccessor:
    def __init__(self, data=...) -> None: ...

class SparseAccessor(BaseAccessor, PandasDelegate):
    @classmethod
    def from_coo(cls, A, dense_index: bool = False) -> Series: ...
    def to_coo(self, row_levels=..., column_levels=..., sort_labels: bool = False): ...
    def to_dense(self): ...

class SparseFrameAccessor(BaseAccessor, PandasDelegate):
    @classmethod
    def from_spmatrix(cls, data, index=..., columns=...): ...
    def to_dense(self): ...
    def to_coo(self): ...
    @property
    def density(self) -> float: ...
