Skip to content

Commit 4e165ed

Browse files
committed
BUG: script illustrating panel-as-table slowness
1 parent ea12f6a commit 4e165ed

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

scripts/hdfstore_panel_perf.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from pandas import *
2+
from pandas.util.testing import rands
3+
4+
i, j, k = 1, 10000, 500
5+
6+
panel = Panel(np.random.randn(i, j, k),
7+
items=[rands(10) for _ in xrange(i)],
8+
major_axis=[rands(10) for _ in xrange(j)],
9+
minor_axis=[rands(10) for _ in xrange(k)])
10+
11+
12+
store = HDFStore('test.h5')
13+
store.put('test_panel', panel, table=True)
14+
15+
retrieved = store['test_panel']

0 commit comments

Comments
 (0)