From c54db1ce14394f03f45019a8dc928157b8c45e71 Mon Sep 17 00:00:00 2001 From: Phil Solimine <15682144+doctor-phil@users.noreply.github.com> Date: Tue, 5 Nov 2024 15:10:44 -0800 Subject: [PATCH] last one for real --- lectures/applications/recidivism.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lectures/applications/recidivism.md b/lectures/applications/recidivism.md index bc36dd41..7ef51c8b 100644 --- a/lectures/applications/recidivism.md +++ b/lectures/applications/recidivism.md @@ -177,7 +177,7 @@ is mostly African-American or Caucasian. We now look into how recidivism is split across groups. ```{code-cell} python -recid = df.groupby(["age_cat", "sex", "race"])["two_year_recid"].mean().unstack(level="race") +recid = df.groupby(["age_cat", "sex", "race"], observed=True)["two_year_recid"].mean().unstack(level="race") recid ```