Код: Выделить всё
import pandas as pd
import numpy as np
truth = pd.DataFrame({"time": np.arange(0.,100.,10.), "truth": 0})
pred = pd.DataFrame({"time": [24., 48., 70.], "pred": [3,2,1]})
Код: Выделить всё
time truth
0 0.0 0
1 10.0 0
2 20.0 0
3 30.0 0
4 40.0 0
5 50.0 0
6 60.0 0
7 70.0 0
8 80.0 0
9 90.0 0
time pred
0 24.0 3
Подробнее здесь: [url]https://stackoverflow.com/questions/79883287/merging-2-dataframes-using-ffill-but-finally-only-retaining-the-rows-from-the-f[/url]
Мобильная версия