def time_key2_opsum_const12_baseline(self) -> None:
     self.df_baseline.groupby(dim_col(2))[const_col([1, 2])].sum()
Beispiel #2
0
 def time_add_const12_baseline(self):
     self.df_baseline[const_col([1, 2])] + self.df_baseline[const_col([1, 2])]
Beispiel #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()
Beispiel #4
0
 def time_sum_const012_baseline(self):
     self.df_baseline[const_col([0, 1, 2])].sum()
Beispiel #5
0
 def time_shift_int_const12_rle(self):
     self.df_rle[const_col([1, 2])].shift(periods=1, fill_value=1)
Beispiel #6
0
 def time_take_unstable_const12_base(self):
     self.df_baseline[const_col([1, 2])].take(self.shuffle_dim2_unstable)
Beispiel #7
0
 def time_groupby2_sum_const12_baseline(self):
     self.df_baseline.groupby(dim_col(2))[const_col([1, 2])].sum()
 def time_const12_base(self) -> None:
     self.df_baseline[const_col([1, 2])].unique()
 def time_const12_rle(self) -> None:
     self.df_rle[const_col([1, 2])].unique()
 def time_int_const12_base(self) -> None:
     self.df_baseline[const_col([1, 2])].shift(periods=1, fill_value=1)
 def time_float_const12_base(self) -> None:
     self.df_baseline[const_col([1, 2])].shift(periods=1)
 def time_sum_const12_rle(self) -> None:
     self.df_rle[const_col([1, 2])].sum()
 def time_sum_const12_baseline(self) -> None:
     self.df_baseline[const_col([1, 2])].sum()
Beispiel #14
0
def test_const_col(dims: List[int], expected: str) -> None:
    actual = const_col(dims)
    assert actual == expected
Beispiel #15
0
 def time_eq_const12_baseline(self):
     self.df_baseline[const_col([1, 2])] == self.df_baseline[const_col([1, 2])]
 def time_const12_base(self) -> None:
     self.df_baseline[const_col([1, 2])].factorize()
Beispiel #17
0
 def time_eq_const12_rle(self):
     self.df_rle[const_col([1, 2])] == self.df_rle[const_col([1, 2])]
 def time_const12_rle(self) -> None:
     with self.ignore_performance_warnings():
         self.df_rle[const_col([1, 2])].factorize()
Beispiel #19
0
 def time_take_stable_const12_rle(self):
     self.df_rle[const_col([1, 2])].take(self.shuffle_dim2_stable)
 def time_decompress_array_astype(self) -> None:
     with self.ignore_performance_warnings():
         self.df_rle[const_col([1, 2])].array.astype(np.int64)
Beispiel #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()
 def time_decompress_to_numpy(self) -> None:
     with self.ignore_performance_warnings():
         self.df_rle[const_col([1, 2])].to_numpy()
Beispiel #23
0
 def time_sum_const012_rle(self):
     self.df_rle[const_col([0, 1, 2])].sum()
 def time_unstable_const12_rle(self) -> None:
     self.df_rle[const_col([1, 2])].take(self.shuffle_dim2_unstable)
Beispiel #25
0
 def time_shift_float_const12_rle(self):
     self.df_rle[const_col([1, 2])].shift(periods=1)
 def time_stable_const12_base(self) -> None:
     self.df_baseline[const_col([1, 2])].take(self.shuffle_dim2_stable)
Beispiel #27
0
 def time_add_const12_rle(self):
     self.df_rle[const_col([1, 2])] + self.df_rle[const_col([1, 2])]
Beispiel #28
0
 def test_const_nunique(self, df: pd.DataFrame, dims: List[int]) -> None:
     assert df[const_col(dims)].nunique() == SIZE**len(dims)