回答編集履歴
1
Update
test
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
```python
|
2
2
|
|
3
|
+
df_count = df.groupby('state').apply(len).to_frame('count')
|
4
|
+
|
3
|
-
df_count = df.groupby('state').count()['name'].to_frame('count')
|
5
|
+
#df_count = df.groupby('state').count()['name'].to_frame('count')
|
4
6
|
|
5
7
|
|
6
8
|
|