예제 #1
0
    def test_div_constant_distributed_df(self):
        df1 = ParallelDataFrame(self.pd_df1, dist_data=False)
        pd_df2 = self.pd_df1.div(10)
        df2 = ParallelDataFrame(pd_df2, dist_data=False)

        result = df1.div(10)
        self.assertTrue(result.equals(df2))
예제 #2
0
    def test_div_by_multiIndex_by_level_replicated_df(self):
        df = ParallelDataFrame(self.pd_df2, dist='replicated')
        rep_multindex = ParallelDataFrame(self.df_multindex, dist='replicated')

        result = df.div(rep_multindex, level=1, fill_value=0)

        pd_result = self.pd_df2.div(self.df_multindex, level=1, fill_value=0)
        self.assertTrue(result.equals(pd_result))
예제 #3
0
    def test_div_constant_replicated_df(self):
        df = ParallelDataFrame(self.pd_df1, dist='replicated')

        result = df.div(10)
        pd_result = self.pd_df1.div(10)
        self.assertTrue(result.equals(pd_result))