回答編集履歴
2
Update
test
CHANGED
@@ -5,6 +5,8 @@
|
|
5
5
|
```python
|
6
6
|
|
7
7
|
import pandas as pd
|
8
|
+
|
9
|
+
import numpy as np
|
8
10
|
|
9
11
|
from io import StringIO
|
10
12
|
|
@@ -72,7 +74,11 @@
|
|
72
74
|
|
73
75
|
df1['データ'] = df1['時間'].apply(lambda t:
|
74
76
|
|
77
|
+
np.nan
|
78
|
+
|
75
|
-
df2[(t>=df2['開始時間'])&(t<df2['終了時間'])]
|
79
|
+
if (x:=df2[(t>=df2['開始時間'])&(t<df2['終了時間'])]).empty
|
80
|
+
|
81
|
+
else x['データ'].values[0])
|
76
82
|
|
77
83
|
|
78
84
|
|
1
Update
test
CHANGED
@@ -58,7 +58,7 @@
|
|
58
58
|
|
59
59
|
2021/12/10 18:00:00,2021/12/10 19:00:00,s
|
60
60
|
|
61
|
-
'''
|
61
|
+
'''.strip()
|
62
62
|
|
63
63
|
|
64
64
|
|