Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.9/dist-packages/pandas/util/__init__.py: 42%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1def __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
6 return hash_array
7 if key == "hash_pandas_object":
8 from pandas.core.util.hashing import hash_pandas_object
10 return hash_pandas_object
11 if key == "Appender":
12 from pandas.util._decorators import Appender
14 return Appender
15 if key == "Substitution":
16 from pandas.util._decorators import Substitution
18 return Substitution
20 if key == "cache_readonly":
21 from pandas.util._decorators import cache_readonly
23 return cache_readonly
25 raise AttributeError(f"module 'pandas.util' has no attribute '{key}'")
28def capitalize_first_letter(s):
29 return s[:1].upper() + s[1:]