回答編集履歴
1
コード修正
answer
CHANGED
@@ -20,7 +20,10 @@
|
|
20
20
|
a[(i+1)*L:(i+2)*L] = df2['C'].values
|
21
21
|
|
22
22
|
print(a.shape) # (2268000,)
|
23
|
+
# 並びを維持したままダブりを消す
|
24
|
+
# https://stackoverflow.com/questions/15637336/numpy-unique-with-order-preserved
|
23
|
-
|
25
|
+
_, idx = np.unique(a, return_index=True)
|
26
|
+
a = a[np.sort(idx)]
|
24
27
|
print(a.shape) # (1138501,)
|
25
28
|
# a = a.reshape(M,L*2) # ダブりを消すとこのカタチにならないのでは?
|
26
29
|
```
|