We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents bbab6ca + a28f57c commit 0aec0ebCopy full SHA for 0aec0eb
lectures/inequality.md
@@ -1094,7 +1094,7 @@ data.head(n=2)
1094
We can first compute the Gini coefficient using the function defined in the lecture above.
1095
1096
```{code-cell} ipython3
1097
-gini_coefficient(data.n_wealth.values)
+gini_coefficient(data.n_wealth.values[1:3000])
1098
```
1099
1100
Now we can write a vectorized version using `numpy`
@@ -1108,7 +1108,7 @@ def gini(y):
1108
return g_sum / (2 * n * np.sum(y))
1109
1110
1111
-gini(data.n_wealth.values)
+gini(data.n_wealth.values[1:3000])
1112
1113
Let's simulate five populations by drawing from a lognormal distribution as before
1114
0 commit comments