Good day,
I need a bit of advice I have two dataframes. One containing hundrends of lines and another containing six. Timestamps are indexed for both frames. I want to compare index values in df1 with df2 and keep only the rows that match the timestamp in df2.
df1
Date-Time A B C D
2012-01-11 7:10:05:00 0 1 2 3
2012-01-11 7:14:05:00 0 1 2 3
2012-01-11 7:16:05:00 0 1 2 3
2012-01-11 7:25:05:00 0 1 2 3
2012-01-11 7:31:05:00 0 1 2 3
df2
Date-Time A B C D
2012-01-11 7:10:05:00 6 8 1.5 6.8
2012-01-11 7:25:05:00 0 11 4 3.3
2012-01-11 7:31:05:00 0 44 2.2 3.3
So only rows 0, 3 and 4 should be remaining in d1
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…