回答編集履歴
1
Update
answer
CHANGED
@@ -9,12 +9,13 @@
|
|
9
9
|
'''.strip()
|
10
10
|
|
11
11
|
testList = np.loadtxt(io.StringIO(csv_data), delimiter=',', dtype='unicode')
|
12
|
+
testList = np.apply_along_axis(
|
12
|
-
|
13
|
+
lambda x: np.array([x[0]]+[*x[1]], dtype=object), -1, testList)
|
13
14
|
|
14
15
|
print(testList)
|
15
16
|
|
16
17
|
#
|
17
18
|
[['cat' 'A' '1']
|
18
19
|
['dog' 'B' '1']
|
19
|
-
['
|
20
|
+
['woif' 'B' '2']]
|
20
21
|
```
|