Skip to content

Commit 4d84816

Browse files
committed
Review (WillAyd) [ci skip]
1 parent 67503c6 commit 4d84816

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

asv_bench/benchmarks/strings.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,11 @@ def setup(self, other_cols, sep, na_rep, na_frac):
9595
mask_gen = lambda: np.random.choice([True, False], N,
9696
p=[1 - na_frac, na_frac])
9797
self.s = Series(tm.makeStringIndex(N)).where(mask_gen())
98-
self.others = (DataFrame({i: tm.makeStringIndex(N).where(mask_gen())
99-
for i in range(other_cols)})
100-
if other_cols > 0 else None)
98+
if other_cols == 0:
99+
self.others = None
100+
else:
101+
self.others = DataFrame({i: tm.makeStringIndex(N).where(mask_gen())
102+
for i in range(other_cols)})
101103

102104
def time_cat(self, other_cols, sep, na_rep, na_frac):
103105
# before the concatenation (one caller + other_cols columns), the total

0 commit comments

Comments
 (0)