예제 #1
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     if self.term_slices is None:
         kwargs = [("term_name_slices", self.term_name_slices)]
     else:
         kwargs = [("term_slices", self.term_slices)]
     if self.builder is not None:
         kwargs.append(("builder", self.builder))
     repr_pretty_impl(p, self, [self.column_names], kwargs)
예제 #2
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     if self.term_slices is None:
         kwargs = [("term_name_slices", self.term_name_slices)]
     else:
         kwargs = [("term_slices", self.term_slices)]
     if self.builder is not None:
         kwargs.append(("builder", self.builder))
     repr_pretty_impl(p, self, [self.column_names], kwargs)
예제 #3
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     class FactorState(object):
         def __repr__(self):
             return "<factor state>"
     kwlist = [("factor", self.factor),
               ("type", self.type),
               # Don't put the state in people's faces, it will
               # just encourage them to pay attention to the
               # contents :-). Plus it's a bunch of gobbledygook
               # they don't care about. They can always look at
               # self.state if they want to know...
               ("state", FactorState()),
               ]
     if self.type == "numerical":
         kwlist.append(("num_columns", self.num_columns))
     else:
         kwlist.append(("categories", self.categories))
     repr_pretty_impl(p, self, [], kwlist)
예제 #4
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     class FactorState(object):
         def __repr__(self):
             return "<factor state>"
     kwlist = [("factor", self.factor),
               ("type", self.type),
               # Don't put the state in people's faces, it will
               # just encourage them to pay attention to the
               # contents :-). Plus it's a bunch of gobbledygook
               # they don't care about. They can always look at
               # self.state if they want to know...
               ("state", FactorState()),
               ]
     if self.type == "numerical":
         kwlist.append(("num_columns", self.num_columns))
     else:
         kwlist.append(("categories", self.categories))
     repr_pretty_impl(p, self, [], kwlist)
예제 #5
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     return repr_pretty_impl(p, self,
                             [self.variable_names, self.coefs, self.constants])
예제 #6
0
 def _repr_pretty_(self, p, cycle):
     return repr_pretty_impl(p, self, [self.type, self.token, self.args])
예제 #7
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     kwargs = []
     if self.extra is not None:
         kwargs = [("extra", self.extra)]
     return repr_pretty_impl(p, self, [self.type, self.origin], kwargs)
예제 #8
0
파일: desc.py 프로젝트: noelhx/patsy
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     repr_pretty_impl(p, self, [list(self.factors)])
예제 #9
0
파일: desc.py 프로젝트: noelhx/patsy
 def _pretty_repr_(self, p, cycle): # pragma: no cover
     assert not cycle
     return repr_pretty_impl(p, self,
                             [self.intercept, self.intercept_origin,
                              self.intercept_removed, self.terms])
예제 #10
0
파일: desc.py 프로젝트: noelhx/patsy
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     return repr_pretty_impl(p, self,
                             [],
                             [("lhs_termlist", self.lhs_termlist),
                              ("rhs_termlist", self.rhs_termlist)])
예제 #11
0
파일: desc.py 프로젝트: danieltaborda/patsy
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     repr_pretty_impl(p, self, [list(self.factors)])
예제 #12
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     kwargs = []
     if self.extra is not None:
         kwargs = [("extra", self.extra)]
     return repr_pretty_impl(p, self, [self.type, self.origin], kwargs)
예제 #13
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     return repr_pretty_impl(p, self,
                             [self.variable_names, self.coefs, self.constants])
예제 #14
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     repr_pretty_impl(p, self,
                      [self.column_names],
                      [("factor_infos", self.factor_infos),
                       ("term_codings", self.term_codings)])
예제 #15
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     repr_pretty_impl(p, self, [],
                      [("factors", self.factors),
                       ("contrast_matrices", self.contrast_matrices),
                       ("num_columns", self.num_columns)])
예제 #16
0
 def _repr_pretty_(self, p, cycle):
     repr_pretty_impl(p, self, [self.matrix, self.column_suffixes])
예제 #17
0
 def _repr_pretty_(self, p, cycle):
     repr_pretty_impl(p, self, [self.matrix, self.column_suffixes])
예제 #18
0
파일: desc.py 프로젝트: danieltaborda/patsy
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     return repr_pretty_impl(p, self,
                             [],
                             [("lhs_termlist", self.lhs_termlist),
                              ("rhs_termlist", self.rhs_termlist)])
예제 #19
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     repr_pretty_impl(p, self, [],
                      [("factors", self.factors),
                       ("contrast_matrices", self.contrast_matrices),
                       ("num_columns", self.num_columns)])
예제 #20
0
파일: desc.py 프로젝트: danieltaborda/patsy
 def _pretty_repr_(self, p, cycle): # pragma: no cover
     assert not cycle
     return repr_pretty_impl(p, self,
                             [self.intercept, self.intercept_origin,
                              self.intercept_removed, self.terms])
예제 #21
0
 def _repr_pretty_(self, p, cycle):
     return repr_pretty_impl(p, self, [self.type, self.token, self.args])
예제 #22
0
 def _repr_pretty_(self, p, cycle):
     assert not cycle
     repr_pretty_impl(p, self,
                      [self.column_names],
                      [("factor_infos", self.factor_infos),
                       ("term_codings", self.term_codings)])