@@ -1912,16 +1912,6 @@ def rindex(self, sub, start=0, end=None):
1912
1912
docstring = _shared_docs ['ismethods' ] %
1913
1913
_shared_docs ['isdecimal' ])
1914
1914
1915
- # TODO: Should we explicitly subclass PandasDelegate to clarify its role,
1916
- # even though it isn't actually needed?
1917
- # TODO: Use this instead of wrapping all of these methods individually?
1918
- def _delegate_method (self , name , * args , ** kwargs ):
1919
- # TODO: It would be really nice to keep the signatures
1920
- method = getattr (self .values , name )
1921
- res = method (* args , ** kwargs )
1922
- # TODO: Should this get wrapped in an index?
1923
- return res
1924
-
1925
1915
@classmethod
1926
1916
def _make_accessor (cls , data ):
1927
1917
from pandas .core .index import Index
@@ -1954,6 +1944,12 @@ def _make_accessor(cls, data):
1954
1944
raise AttributeError (message )
1955
1945
return StringAccessor (data )
1956
1946
1947
+ # TODO: Should we explicitly subclass PandasDelegate to clarify its
1948
+ # role, even though it isn't actually needed?
1949
+ # _delegate_method is really simple in this case:
1950
+ # getattr(self.values, name)(*args, **kwargs)
1951
+ # possibly wrapped in an Index.
1952
+
1957
1953
1958
1954
StringAccessor = StringMethods # Alias to mirror CategoricalAccessor
1959
1955
0 commit comments