properties.pyi 717 B

123456789101112131415161718192021222324252627
  1. from typing import (
  2. Sequence,
  3. overload,
  4. )
  5. from pandas._typing import (
  6. AnyArrayLike,
  7. DataFrame,
  8. Index,
  9. Series,
  10. )
  11. # note: this is a lie to make type checkers happy (they special
  12. # case property). cache_readonly uses attribute names similar to
  13. # property (fget) but it does not provide fset and fdel.
  14. cache_readonly = property
  15. class AxisProperty:
  16. axis: int
  17. def __init__(self, axis: int = ..., doc: str = ...) -> None: ...
  18. @overload
  19. def __get__(self, obj: DataFrame | Series, type) -> Index: ...
  20. @overload
  21. def __get__(self, obj: None, type) -> AxisProperty: ...
  22. def __set__(
  23. self, obj: DataFrame | Series, value: AnyArrayLike | Sequence
  24. ) -> None: ...