Skip to content

Commit c1f869f

Browse files
committed
fix a minor bug
1 parent 39e72db commit c1f869f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lectures/pandas_panel.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ merged.stack().describe()
428428

429429
```{code-cell} ipython3
430430
grouped = merged.T.groupby(level='Continent')
431-
grouped
431+
grouped.keys
432432
```
433433

434434
在对象上调用`groupby`方法时,该函数会被应用于每个组,运算结果会被合并到一个新的数据结构中。
@@ -449,7 +449,7 @@ grouped.size()
449449
continents = grouped.groups.keys()
450450
451451
for continent in continents:
452-
sns.kdeplot(grouped.get_group(continent).loc['2015'].unstack(),
452+
sns.kdeplot(grouped.get_group(continent).T.loc['2015'].unstack(),
453453
label=continent_map[continent], fill=True)
454454
455455
plt.title('2015年实际最低工资')

0 commit comments

Comments
 (0)