File tree 1 file changed +2
-15
lines changed
1 file changed +2
-15
lines changed Original file line number Diff line number Diff line change 9
9
10
10
import operator
11
11
12
- from pandas import compat
13
- from pandas .core .config import get_option
12
+ from pandas .core .base import StringMixin
14
13
from pandas .core .dtypes .generic import ABCSeries , ABCIndexClass
15
14
from pandas .errors import AbstractMethodError
16
15
from pandas .compat .numpy import function as nv
21
20
_not_implemented_message = "{} does not implement {}."
22
21
23
22
24
- class ExtensionArray (object ):
23
+ class ExtensionArray (StringMixin ):
25
24
"""Abstract base class for custom 1-D array types.
26
25
27
26
pandas will recognize instances of this class as proper arrays
@@ -682,18 +681,6 @@ def __unicode__(self):
682
681
length = len (self ),
683
682
dtype = self .dtype )
684
683
685
- def __str__ (self ):
686
- if compat .PY3 :
687
- return self .__unicode__ ()
688
- return self .__bytes__ ()
689
-
690
- def __bytes__ (self ):
691
- encoding = get_option ("display.encoding" )
692
- return self .__unicode__ ().encode (encoding , 'replace' )
693
-
694
- def __repr__ (self ):
695
- return str (self )
696
-
697
684
def _formatter (self , formatter = None ):
698
685
# type: (Optional[ExtensionArrayFormatter]) -> Callable[[Any], str]
699
686
"""Formatting function for scalar values.
You can’t perform that action at this time.
0 commit comments