merge dataframes with timestamps and intervals
问题 I have two dataframes. df1contains number and timestamps. It is a very large set. df1.head() Out[292]: 2016-08-31 08:09:00 1.0 2016-08-31 08:11:00 7.0 2016-08-31 08:14:00 90.0 df2 contains intervals d2.head() Out[292]: start stop C 2016-08-31 08:09:00 2016-08-31 08:12:00 'a' 2016-08-31 08:13:00 2016-08-31 08:20:00 'b' 2016-08-31 08:20:00 2016-08-31 08:45:00 'c' I would like to add a new column C to df1 such that the value of C is corresponding to the value in df2 for the interval which