Exemple #1
0
 def __repr__(self):
     arr_repr = ndarray.__repr__(self)
     weights = self._weights
     if weights is not None:
         weights_repr = repr(weights)
         arr_repr += '\nweights=\n{0}'.format(weights_repr)
     return arr_repr
Exemple #2
0
 def __repr__(self):
     """Clean string representation of a Series"""
     if len(self.index) > 500:
         return self._make_repr(50)
     elif len(self.index) > 0:
         return _seriesRepr(self.index, self.values)
     else:
         return '%s' % ndarray.__repr__(self)
Exemple #3
0
    def __repr__(self):
        """Clean string representation of a Series"""
        vals = self.values
        index = self.index

        if len(index) > 500:
            head = _seriesRepr(index[:50], vals[:50])
            tail = _seriesRepr(index[-50:], vals[-50:])
            return head + '\n...\n' + tail + '\nlength: %d' % len(vals)
        elif len(index) > 0:
            return _seriesRepr(index, vals)
        else:
            return '%s' % ndarray.__repr__(self)
Exemple #4
0
    def __repr__(self):
        """Clean string representation of a Series"""
        vals = self.values
        index = self.index

        if len(index) > 500:
            head = _seriesRepr(index[:50], vals[:50])
            tail = _seriesRepr(index[-50:], vals[-50:])
            return head + '\n...\n' + tail + '\nlength: %d' % len(vals)
        elif len(index) > 0:
            return _seriesRepr(index, vals)
        else:
            return '%s' % ndarray.__repr__(self)
Exemple #5
0
 def __repr__(self):
     return ndarray.__repr__(self)[:-1] + \
            ",\n          freq='%s')" % self.freqstr
Exemple #6
0
 def __repr__(self):
   return "%s\n    axis info: %s" % (ndarray.__repr__(self), str(self._info))
 def __repr__(self):
     return "%s\n  axis info: %s" % (ndarray.__repr__(self), str(
         self._info))
Exemple #8
0
 def __repr__(self):
     return ndarray.__repr__(self)[:-1] + \
            ",\n          freq='%s')" % self.freqstr
 def __repr__(a):
     s = ndarray.__repr__(a).replace(
         '\n', '\n' + ' ' * (len(a.__class__.__name__) - len('array')) )
     if a.units != dimensionless: s += ' * ' + a.dimensionality.string
     return s.replace( 'nan', '...' )