Beispiel #1
0
 def test__transform_with_int_ybins(self):
     df = pd.DataFrame()
     df["x"] = [0, 1, 2, 3, 4]
     df["y"] = [0, 1, 2, 3, 4]
     scatter = BubbleScatter(df, "x", "y", ybins=2)
     result = scatter._transform("y")
     true_result = pd.Series([1.0, 1.0, 1.0, 3.0, 3.0], name="y")
     self.assertTrue(result.equals(true_result))
Beispiel #2
0
 def test__transform_no_ybins(self):
     df = pd.DataFrame()
     df["x"] = [1, 2, 3]
     df["y"] = [1, 2, 3]
     scatter = BubbleScatter(df, "x", "y")
     result = scatter._transform("y")
     true_result = df["x"]
     self.assertTrue(result.equals(true_result))