Esempio n. 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
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 5
0
 def __repr__(self):
     return ndarray.__repr__(self)[:-1] + \
            ",\n          freq='%s')" % self.freqstr
Esempio n. 6
0
 def __repr__(self):
   return "%s\n    axis info: %s" % (ndarray.__repr__(self), str(self._info))
Esempio n. 7
0
 def __repr__(self):
     return "%s\n  axis info: %s" % (ndarray.__repr__(self), str(
         self._info))
Esempio n. 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', '...' )