You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lectures/inequality.md
+22-13Lines changed: 22 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -193,7 +193,7 @@ The following code block uses data stored in dataframe ``df_income_wealth`` to g
193
193
population weights supplied by the SCF.)
194
194
195
195
```{code-cell} ipython3
196
-
:tags: [hide_input]
196
+
:tags: [hide-input]
197
197
198
198
df = df_income_wealth
199
199
@@ -408,7 +408,7 @@ The following code creates a list called ``Ginis``.
408
408
It stores data of Gini coefficients generated from the dataframe ``df_income_wealth`` and method [gini_coefficient](https://quanteconpy.readthedocs.io/en/latest/tools/inequality.html#quantecon.inequality.gini_coefficient), from [QuantEcon](https://quantecon.org/quantecon-py/) library.
409
409
410
410
```{code-cell} ipython3
411
-
:tags: [hide_input]
411
+
:tags: [hide-input]
412
412
413
413
varlist = ['n_wealth', # net wealth
414
414
't_income', # total income
@@ -535,11 +535,11 @@ The following code uses the data from dataframe ``df_income_wealth`` to generate
535
535
``df_topshares`` stores the top 10 percent shares for the total income, the labor income and net wealth from 1950 to 2016 in US.
536
536
537
537
```{code-cell} ipython3
538
-
:tags: [hide_input]
538
+
:tags: [hide-input]
539
539
540
540
# transfer the survey weights from absolute into relative values
541
541
df1 = df_income_wealth
542
-
df2 = df1.groupby('year').sum(numeric_only=True).reset_index() # group
0 commit comments