質問編集履歴
1
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -52,7 +52,7 @@
|
|
52
52
|
|
53
53
|
|
54
54
|
|
55
|
-
|
55
|
+
次のコードでひとまず対応はできますが、もっとシンプルなやり方はないでしょうか?
|
56
56
|
|
57
57
|
|
58
58
|
|
@@ -60,12 +60,12 @@
|
|
60
60
|
|
61
61
|
df_2 = pd.DataFrame({})
|
62
62
|
|
63
|
-
df_2.loc[:,'大人_男'] = df['大人','男']
|
63
|
+
df_2.loc[:,'大人_男'] = df_1['大人','男']
|
64
64
|
|
65
|
-
df_2.loc[:,'大人_女'] = df['大人','女']
|
65
|
+
df_2.loc[:,'大人_女'] = df_1['大人','女']
|
66
66
|
|
67
|
-
df_2.loc[:,'子供_男'] = df['子供','男']
|
67
|
+
df_2.loc[:,'子供_男'] = df_1['子供','男']
|
68
68
|
|
69
|
-
df_2.loc[:,'子供_女'] = df['子供','女']
|
69
|
+
df_2.loc[:,'子供_女'] = df_1['子供','女']
|
70
70
|
|
71
71
|
```
|