[
基於列值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