Skip to content

Commit 6709b0e

Browse files
committed
GH pandas-dev#28122 add ASV check for groupby with uint64 col
1 parent dae5c59 commit 6709b0e

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

asv_bench/benchmarks/groupby.py

+20
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,26 @@ def time_srs_bfill(self):
389389
self.df.groupby("group")["value"].fillna(method="bfill")
390390

391391

392+
class UInt64:
393+
def setup(self):
394+
N = 100
395+
uints = np.random.randint(0, 10, size=N).astype("uint64")
396+
ints = np.random.randint(0, 10, size=N).astype("int64")
397+
self.df = DataFrame({"u": uints, "i": ints})
398+
399+
def time_df_min_uint_groups(self):
400+
self.df.groupby("u").min()
401+
402+
def time_df_min_uint_vals(self):
403+
self.df.groupby("i").min()
404+
405+
def time_srs_min_uint_groups(self):
406+
self.df.groupby("u")["i"].min()
407+
408+
def time_srs_min_uint_vals(self):
409+
self.df.groupby("i")["u"].min()
410+
411+
392412
class GroupByMethods:
393413

394414
param_names = ["dtype", "method", "application"]

0 commit comments

Comments
 (0)