Skip to content

Commit 73f5f9a

Browse files
author
y-p
committed
VB: add vbench for df.xs across row/col
1 parent 1fdabbc commit 73f5f9a

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

vb_suite/frame_methods.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,23 @@ def interactive_repr(frame):
158158
159159
df = pandas.DataFrame(np.random.randn(10,10000))
160160
"""
161-
161+
162162
frame_wide_repr = Benchmark('repr(df)', setup,
163163
start_date=datetime(2012, 8, 1))
164164

165165
frame_wide_repr_interactive = Benchmark('interactive_repr(df)', setup,
166166
start_date=datetime(2012, 8, 1))
167+
168+
##
169+
setup = common_setup + """
170+
df = DataFrame(randn(100000, 1))
171+
"""
172+
173+
frame_xs_row = Benchmark('df.xs(50000)', setup)
174+
175+
##
176+
setup = common_setup + """
177+
df = DataFrame(randn(1,100000))
178+
"""
179+
180+
frame_xs_col = Benchmark('df.xs(50000,axis = 1)', setup)

0 commit comments

Comments
 (0)