回答編集履歴

1

訂正

2020/09/30 11:08

投稿

meg_
meg_

スコア10749

test CHANGED
@@ -10,24 +10,24 @@
10
10
 
11
11
  xxb[i] = 0
12
12
 
13
- xxb.columns = xxb.columns.sort_values()
13
+ xxb = xxb.reindex(columns=xxb.columns.sort_values())
14
14
 
15
15
  print(xxb)
16
16
 
17
17
 
18
18
 
19
- # C 1 2 3 4 5 6
19
+ #C 1 2 3 4 5 6
20
20
 
21
- # A
21
+ #A
22
22
 
23
- # 1 1 0 0 0 0 0
23
+ #1 1 0 0 0 0 0
24
24
 
25
- # 2 0 1 0 0 0 0
25
+ #2 0 0 1 0 0 0
26
26
 
27
- # 3 0 0 0 0 0 0
27
+ #3 0 0 0 0 0 0
28
28
 
29
- # 4 0 0 1 0 0 0
29
+ #4 0 0 0 0 1 0
30
30
 
31
- # 5 0 0 0 1 0 0
31
+ #5 0 0 0 0 0 1
32
32
 
33
33
  ```