1010import pandas as pd
1111from pandas .compat import PY3 , string_types , text_type
1212import pandas .core .common as com
13+ from pandas .formats .printing import pprint_thing , pprint_thing_encoded
1314import pandas .lib as lib
1415from pandas .core .base import StringMixin
1516from pandas .computation .common import _ensure_decoded , _result_type_many
@@ -62,7 +63,7 @@ def local_name(self):
6263 return self .name .replace (_LOCAL_TAG , '' )
6364
6465 def __unicode__ (self ):
65- return com . pprint_thing (self .name )
66+ return pprint_thing (self .name )
6667
6768 def __call__ (self , * args , ** kwargs ):
6869 return self .value
@@ -118,9 +119,9 @@ def type(self):
118119
119120 @property
120121 def raw (self ):
121- return com . pprint_thing ('{0}(name={1!r}, type={2})'
122- '' .format (self .__class__ .__name__ , self .name ,
123- self .type ))
122+ return pprint_thing ('{0}(name={1!r}, type={2})'
123+ '' .format (self .__class__ .__name__ , self .name ,
124+ self .type ))
124125
125126 @property
126127 def is_datetime (self ):
@@ -186,9 +187,9 @@ def __unicode__(self):
186187 """Print a generic n-ary operator and its operands using infix
187188 notation"""
188189 # recurse over the operands
189- parened = ('({0})' .format (com . pprint_thing (opr ))
190+ parened = ('({0})' .format (pprint_thing (opr ))
190191 for opr in self .operands )
191- return com . pprint_thing (' {0} ' .format (self .op ).join (parened ))
192+ return pprint_thing (' {0} ' .format (self .op ).join (parened ))
192193
193194 @property
194195 def return_type (self ):
@@ -390,10 +391,10 @@ def convert_values(self):
390391 """
391392 def stringify (value ):
392393 if self .encoding is not None :
393- encoder = partial (com . pprint_thing_encoded ,
394+ encoder = partial (pprint_thing_encoded ,
394395 encoding = self .encoding )
395396 else :
396- encoder = com . pprint_thing
397+ encoder = pprint_thing
397398 return encoder (value )
398399
399400 lhs , rhs = self .lhs , self .rhs
@@ -491,7 +492,7 @@ def __call__(self, env):
491492 return self .func (operand )
492493
493494 def __unicode__ (self ):
494- return com . pprint_thing ('{0}({1})' .format (self .op , self .operand ))
495+ return pprint_thing ('{0}({1})' .format (self .op , self .operand ))
495496
496497 @property
497498 def return_type (self ):
@@ -516,7 +517,7 @@ def __call__(self, env):
516517
517518 def __unicode__ (self ):
518519 operands = map (str , self .operands )
519- return com . pprint_thing ('{0}({1})' .format (self .op , ',' .join (operands )))
520+ return pprint_thing ('{0}({1})' .format (self .op , ',' .join (operands )))
520521
521522
522523class FuncNode (object ):
0 commit comments