Skip to content

Commit 2f344c1

Browse files
author
y-p
committed
VB: add vbench for truncated repr_html
1 parent d613b9d commit 2f344c1

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

vb_suite/frame_methods.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,35 @@ def f(x):
157157
"""
158158

159159
frame_to_html_mixed = Benchmark('df.to_html()', setup,
160-
start_date=datetime(2010, 6, 1))
160+
start_date=datetime(2011, 11, 18))
161+
162+
163+
# truncated repr_html, single index
164+
165+
setup = common_setup + """
166+
nrows=10000
167+
data=randn(nrows,10)
168+
idx=MultiIndex.from_arrays(np.tile(randn(3,nrows/100),100))
169+
df=DataFrame(data,index=idx)
170+
171+
"""
172+
173+
frame_html_repr_trunc_mi = Benchmark('df._repr_html_()', setup,
174+
start_date=datetime(2013, 11, 25))
175+
176+
# truncated repr_html, MultiIndex
177+
178+
setup = common_setup + """
179+
nrows=10000
180+
data=randn(nrows,10)
181+
idx=randn(nrows)
182+
df=DataFrame(data,index=idx)
183+
184+
"""
185+
186+
frame_html_repr_trunc_si = Benchmark('df._repr_html_()', setup,
187+
start_date=datetime(2013, 11, 25))
188+
161189

162190
# insert many columns
163191

0 commit comments

Comments
 (0)