回答編集履歴
2
Update
test
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
```python
|
2
2
|
|
3
|
-
df
|
3
|
+
df_list = df2.apply(lambda x: df1[df1.key.isin([x.key]+x.d.split(','))], axis=1)
|
4
4
|
|
5
5
|
|
6
6
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
print(f'key = {df2.key[i]}')
|
10
10
|
|
11
|
-
print(df
|
11
|
+
print(df_list[i])
|
12
12
|
|
13
13
|
|
14
14
|
|
1
Update
test
CHANGED
@@ -4,9 +4,17 @@
|
|
4
4
|
|
5
5
|
|
6
6
|
|
7
|
+
for i in range(len(df2)):
|
8
|
+
|
9
|
+
print(f'key = {df2.key[i]}')
|
10
|
+
|
7
|
-
print(dfx[
|
11
|
+
print(dfx[i])
|
12
|
+
|
13
|
+
|
8
14
|
|
9
15
|
#
|
16
|
+
|
17
|
+
key = 01
|
10
18
|
|
11
19
|
key b c
|
12
20
|
|
@@ -18,9 +26,7 @@
|
|
18
26
|
|
19
27
|
|
20
28
|
|
21
|
-
|
29
|
+
key = FF
|
22
|
-
|
23
|
-
#
|
24
30
|
|
25
31
|
key b c
|
26
32
|
|