diff --git a/asv_bench/benchmarks/indexing.py b/asv_bench/benchmarks/indexing.py index 38d1f64bd5f4e..e95e5bec5849c 100644 --- a/asv_bench/benchmarks/indexing.py +++ b/asv_bench/benchmarks/indexing.py @@ -3,6 +3,7 @@ lower-level methods directly on Index and subclasses, see index_object.py, indexing_engine.py, and index_cached.py """ +import itertools import string import warnings @@ -256,7 +257,9 @@ def setup(self, index): "non_monotonic": CategoricalIndex(list("abc" * N)), } self.data = indices[index] - self.data_unique = CategoricalIndex(list(string.printable)) + self.data_unique = CategoricalIndex( + ["".join(perm) for perm in itertools.permutations(string.printable, 3)] + ) self.int_scalar = 10000 self.int_list = list(range(10000))