We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 47418a1 commit 680b215Copy full SHA for 680b215
pandas/core/dtypes/dtypes.py
@@ -62,8 +62,6 @@
62
is_list_like,
63
)
64
65
-from pandas.util import capitalize_first_letter
66
-
67
if not pa_version_under10p1:
68
import pyarrow as pa
69
@@ -1087,7 +1085,7 @@ def na_value(self) -> NaTType:
1087
1085
1088
1086
def __eq__(self, other: object) -> bool:
1089
if isinstance(other, str):
1090
- return other in [self.name, capitalize_first_letter(self.name)]
+ return other[:1].lower() + other[1:] == self.name
1091
1092
return super().__eq__(other)
1093
pandas/util/__init__.py
@@ -27,7 +27,3 @@ def __getattr__(key: str):
27
28
def __dir__():
29
return list(globals().keys()) + ["hash_array", "hash_pandas_object"]
30
31
32
-def capitalize_first_letter(s: str) -> str:
33
- return s[:1].upper() + s[1:]
0 commit comments