Exemplo n.º 1
0
    def testDecideSeriesChunks(self):
        with option_context() as options:
            options.chunk_store_limit = 64

            s = pd.Series(np.empty(50, dtype=np.int64))
            nsplit = decide_series_chunk_size(s.shape, None, s.memory_usage(index=False, deep=True))
            self.assertEqual(len(nsplit), 1)
            self.assertEqual(sum(nsplit[0]), 50)
            self.assertEqual(nsplit[0][0], 8)
Exemplo n.º 2
0
def test_decide_series_chunks():
    with option_context() as options:
        options.chunk_store_limit = 64

        s = pd.Series(np.empty(50, dtype=np.int64))
        nsplit = decide_series_chunk_size(
            s.shape, None, s.memory_usage(index=False, deep=True))
        assert len(nsplit) == 1
        assert sum(nsplit[0]) == 50
        assert nsplit[0][0] == 8