回答編集履歴
1
Update
test
CHANGED
@@ -3,8 +3,7 @@
|
|
3
3
|
df2.apply(lambda x:
|
4
4
|
df1[df1['date'].between(x['Startdate'], x['Enddate'])&
|
5
5
|
(df1['商品コード']==x['商品コード'])][['units', 'value']].sum().astype(int),
|
6
|
-
axis=1)
|
6
|
+
axis=1))
|
7
|
-
)
|
8
7
|
|
9
8
|
print(df2.to_markdown(index=False))
|
10
9
|
```
|