We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf270f6 commit 0cae716Copy full SHA for 0cae716
asv_bench/benchmarks/frame_methods.py
@@ -52,6 +52,7 @@ def setup(self):
52
N = 10 ** 3
53
self.df = DataFrame(np.random.randn(N * 10, N))
54
self.idx = np.arange(4 * N, 7 * N)
55
+ self.idx_cols = np.random.randint(0, N, N)
56
self.df2 = DataFrame(
57
{
58
c: {
@@ -68,6 +69,9 @@ def time_reindex_axis0(self):
68
69
self.df.reindex(self.idx)
70
71
def time_reindex_axis1(self):
72
+ self.df.reindex(columns=self.idx_cols)
73
+
74
+ def time_reindex_axis1_missing(self):
75
self.df.reindex(columns=self.idx)
76
77
def time_reindex_both_axes(self):
0 commit comments