[
基于列值ranges
#从df_2创建间隔索引 df_2.index = pd.intervalindex.from_arrays(df_2 ['start'],df_2 ['end'],nluct ='ot ='两者') #获取DF_1中每个时间戳的相应事件 df_1 ['event'] = df_1 ['timestamp']。应用(lambda x:df_2.iloc [df_2.index.get_loc(x)] ['event''])在DF_1中命名为DF_1中的新列,其中包含每个符号事件的df_1,该事件为每个fimestamp shiles of Seppefs seppecied sefters necters necters necters nects nects necters necters nectife nectife the nectement。生成的加入数据框将包含以下列: TIMESTAMP A B事件
免责声明: 提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发到邮箱:[email protected] 我们会第一时间内为您处理。
Copyright© 2022 湘ICP备2022001581号-3