We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a3991ab commit 8000906Copy full SHA for 8000906
asv_bench/benchmarks/reshape.py
@@ -102,6 +102,7 @@ def setup(self, dtype):
102
columns = np.arange(n)
103
if dtype == "int":
104
values = np.arange(m * m * n).reshape(m * m, n)
105
+ self.df = DataFrame(values, index, columns)
106
else:
107
# the category branch is ~20x slower than int. So we
108
# cut down the size a bit. Now it's only ~3x slower.
@@ -111,7 +112,10 @@ def setup(self, dtype):
111
112
values = np.take(list(string.ascii_letters), indices)
113
values = [pd.Categorical(v) for v in values.T]
114
- self.df = DataFrame({i: cat for i, cat in enumerate(values)}, index, columns)
115
+ self.df = DataFrame(
116
+ {i: cat for i, cat in enumerate(values)}, index, columns
117
+ )
118
+
119
self.df2 = self.df.iloc[:-1]
120
121
def time_full_product(self, dtype):
0 commit comments