Skip to content

Commit 4f0b31b

Browse files
Bug Fix: use iloc to index pd.Series (#877)
1 parent 2e54c06 commit 4f0b31b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

causalml/dataset/synthetic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,10 +544,10 @@ def scatter_plot_summary_holdout(
544544

545545
for g in np.unique(group):
546546
ix = np.where(group == g)[0].tolist()
547-
ax.scatter(xs[ix], ys[ix], c=cdict[g], label=g, s=100)
547+
ax.scatter(xs.iloc[ix], ys.iloc[ix], c=cdict[g], label=g, s=100)
548548

549549
for i, txt in enumerate(plot_data.label[:10]):
550-
ax.annotate(txt, (xs[i] + 0.005, ys[i]))
550+
ax.annotate(txt, (xs.iloc[i] + 0.005, ys.iloc[i]))
551551

552552
ax.set_xlabel("Abs % Error of ATE")
553553
ax.set_ylabel("MSE")

0 commit comments

Comments
 (0)