コード例 #1
0
ファイル: test_pytools.py プロジェクト: willgrass/pandas
def test_adjoin():
    data = [['a', 'b', 'c'], ['dd', 'ee', 'ff'], ['ggg', 'hhh', 'iii']]
    expected = 'a  dd  ggg\nb  ee  hhh\nc  ff  iii'

    adjoined = pytools.adjoin(2, *data)

    assert (adjoined == expected)
コード例 #2
0
ファイル: test_pytools.py プロジェクト: choketsu/pandas
def test_adjoin():
    data = [['a', 'b', 'c'],
            ['dd', 'ee', 'ff'],
            ['ggg', 'hhh', 'iii']]
    expected = 'a  dd  ggg\nb  ee  hhh\nc  ff  iii'

    adjoined = pytools.adjoin(2, *data)

    assert(adjoined == expected)
コード例 #3
0
ファイル: pytables.py プロジェクト: choketsu/pandas
    def __repr__(self):
        output = str(self.__class__) + '\n'

        keys = []
        values = []
        for k, v in sorted(self.handle.root._v_children.iteritems()):
            kind = v._v_attrs.pandas_type

            keys.append(str(k))
            values.append(kind)

        output += adjoin(5, keys, values)
        return output
コード例 #4
0
ファイル: pytables.py プロジェクト: willgrass/pandas
    def __repr__(self):
        output = str(self.__class__) + '\n'

        keys = []
        values = []
        for k, v in sorted(self.handle.root._v_children.iteritems()):
            kind = v._v_attrs.pandas_type

            keys.append(str(k))
            values.append(kind)

        output += adjoin(5, keys, values)
        return output
コード例 #5
0
 def __repr__(self):
     output = str(self.__class__) + '\n'
     keys, values = zip(*self._classes.iteritems())
     output += adjoin(5, map(str, keys), map(str, values))
     return output
コード例 #6
0
ファイル: collection.py プロジェクト: choketsu/pandas
 def __repr__(self):
     output = str(self.__class__) + '\n'
     keys, values = zip(*self._classes.iteritems())
     output += adjoin(5, map(str, keys), map(str, values))
     return output