__init__.py 827 B

1234567891011121314151617181920212223242526272829
  1. def __getattr__(key: str):
  2. # These imports need to be lazy to avoid circular import errors
  3. if key == "hash_array":
  4. from pandas.core.util.hashing import hash_array
  5. return hash_array
  6. if key == "hash_pandas_object":
  7. from pandas.core.util.hashing import hash_pandas_object
  8. return hash_pandas_object
  9. if key == "Appender":
  10. from pandas.util._decorators import Appender
  11. return Appender
  12. if key == "Substitution":
  13. from pandas.util._decorators import Substitution
  14. return Substitution
  15. if key == "cache_readonly":
  16. from pandas.util._decorators import cache_readonly
  17. return cache_readonly
  18. raise AttributeError(f"module 'pandas.util' has no attribute '{key}'")
  19. def capitalize_first_letter(s):
  20. return s[:1].upper() + s[1:]