回答編集履歴
1
修正
test
CHANGED
@@ -58,25 +58,25 @@
|
|
58
58
|
|
59
59
|
|
60
60
|
|
61
|
-
df = pd.merge_asof(df1, df2, on='time')
|
61
|
+
df = pd.merge_asof(df1, df2, on='time', direction='nearest')
|
62
62
|
|
63
63
|
print(df)
|
64
64
|
|
65
65
|
"""
|
66
66
|
|
67
|
-
time Y
|
67
|
+
time Y Z
|
68
68
|
|
69
|
-
0 0.0 3
|
69
|
+
0 0.0 3 4
|
70
70
|
|
71
|
-
1 0.5 5
|
71
|
+
1 0.5 5 3
|
72
72
|
|
73
|
-
2 1.0 4
|
73
|
+
2 1.0 4 4
|
74
74
|
|
75
|
-
3 1.5 8
|
75
|
+
3 1.5 8 9
|
76
76
|
|
77
|
-
4 2.0 10
|
77
|
+
4 2.0 10 1
|
78
78
|
|
79
|
-
5 2.5 7
|
79
|
+
5 2.5 7 5
|
80
80
|
|
81
81
|
"""
|
82
82
|
|