Esempio n. 1
0
 def time_key2_opsum_const12_baseline(self) -> None:
     self.df_baseline.groupby(dim_col(2))[const_col([1, 2])].sum()
Esempio n. 2
0
 def time_add_const12_baseline(self):
     self.df_baseline[const_col([1, 2])] + self.df_baseline[const_col([1, 2])]
Esempio n. 3
0
 def test_const_value_counts(self, df: pd.DataFrame,
                             dims: List[int]) -> None:
     assert (df[const_col(dims)].value_counts() == SIZE**(N_DIMS -
                                                          len(dims))).all()
Esempio n. 4
0
 def time_sum_const012_baseline(self):
     self.df_baseline[const_col([0, 1, 2])].sum()
Esempio n. 5
0
 def time_shift_int_const12_rle(self):
     self.df_rle[const_col([1, 2])].shift(periods=1, fill_value=1)
Esempio n. 6
0
 def time_take_unstable_const12_base(self):
     self.df_baseline[const_col([1, 2])].take(self.shuffle_dim2_unstable)
Esempio n. 7
0
 def time_groupby2_sum_const12_baseline(self):
     self.df_baseline.groupby(dim_col(2))[const_col([1, 2])].sum()
Esempio n. 8
0
 def time_const12_base(self) -> None:
     self.df_baseline[const_col([1, 2])].unique()
Esempio n. 9
0
 def time_const12_rle(self) -> None:
     self.df_rle[const_col([1, 2])].unique()
Esempio n. 10
0
 def time_int_const12_base(self) -> None:
     self.df_baseline[const_col([1, 2])].shift(periods=1, fill_value=1)
Esempio n. 11
0
 def time_float_const12_base(self) -> None:
     self.df_baseline[const_col([1, 2])].shift(periods=1)
Esempio n. 12
0
 def time_sum_const12_rle(self) -> None:
     self.df_rle[const_col([1, 2])].sum()
Esempio n. 13
0
 def time_sum_const12_baseline(self) -> None:
     self.df_baseline[const_col([1, 2])].sum()
Esempio n. 14
0
def test_const_col(dims: List[int], expected: str) -> None:
    actual = const_col(dims)
    assert actual == expected
Esempio n. 15
0
 def time_eq_const12_baseline(self):
     self.df_baseline[const_col([1, 2])] == self.df_baseline[const_col([1, 2])]
Esempio n. 16
0
 def time_const12_base(self) -> None:
     self.df_baseline[const_col([1, 2])].factorize()
Esempio n. 17
0
 def time_eq_const12_rle(self):
     self.df_rle[const_col([1, 2])] == self.df_rle[const_col([1, 2])]
Esempio n. 18
0
 def time_const12_rle(self) -> None:
     with self.ignore_performance_warnings():
         self.df_rle[const_col([1, 2])].factorize()
Esempio n. 19
0
 def time_take_stable_const12_rle(self):
     self.df_rle[const_col([1, 2])].take(self.shuffle_dim2_stable)
Esempio n. 20
0
 def time_decompress_array_astype(self) -> None:
     with self.ignore_performance_warnings():
         self.df_rle[const_col([1, 2])].array.astype(np.int64)
Esempio n. 21
0
 def time_groupby2_sum_const12_rle(self):
     with self.ignore_performance_warnings():
         self.df_rle_wo_dims.groupby(dim_col(2))[const_col([1, 2])].sum()
Esempio n. 22
0
 def time_decompress_to_numpy(self) -> None:
     with self.ignore_performance_warnings():
         self.df_rle[const_col([1, 2])].to_numpy()
Esempio n. 23
0
 def time_sum_const012_rle(self):
     self.df_rle[const_col([0, 1, 2])].sum()
Esempio n. 24
0
 def time_unstable_const12_rle(self) -> None:
     self.df_rle[const_col([1, 2])].take(self.shuffle_dim2_unstable)
Esempio n. 25
0
 def time_shift_float_const12_rle(self):
     self.df_rle[const_col([1, 2])].shift(periods=1)
Esempio n. 26
0
 def time_stable_const12_base(self) -> None:
     self.df_baseline[const_col([1, 2])].take(self.shuffle_dim2_stable)
Esempio n. 27
0
 def time_add_const12_rle(self):
     self.df_rle[const_col([1, 2])] + self.df_rle[const_col([1, 2])]
Esempio n. 28
0
 def test_const_nunique(self, df: pd.DataFrame, dims: List[int]) -> None:
     assert df[const_col(dims)].nunique() == SIZE**len(dims)