Skip to content

Commit 3d835ab

Browse files
committed
PERF: add asv benchmark for pivot_table options
1 parent 6b2df0a commit 3d835ab

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

asv_bench/benchmarks/reshape.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,14 @@ def setup(self):
131131
def time_pivot_table(self):
132132
self.df.pivot_table(index='key1', columns=['key2', 'key3'])
133133

134+
def time_pivot_table_agg(self):
135+
self.df.pivot_table(index='key1', columns=['key2', 'key3'],
136+
aggfunc=['sum', 'mean'])
137+
138+
def time_pivot_table_margins(self):
139+
self.df.pivot_table(index='key1', columns=['key2', 'key3'],
140+
margins=True)
141+
134142

135143
class GetDummies(object):
136144
def setup(self):

0 commit comments

Comments
 (0)