Skip to content

Commit

Permalink
last one for real
Browse files Browse the repository at this point in the history
  • Loading branch information
doctor-phil committed Nov 5, 2024
1 parent 765b3de commit c54db1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lectures/applications/recidivism.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down

0 comments on commit c54db1c

Please sign in to comment.