第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

從 for 循環(huán)輸出連接大數(shù)據(jù)框 Python

從 for 循環(huán)輸出連接大數(shù)據(jù)框 Python

慕標琳琳 2021-09-14 15:50:53
我正在嘗試根據(jù)每個 for 循環(huán)輸出的切片結(jié)果構(gòu)建一個大數(shù)據(jù)集。我所做的代碼如下:for n in range(4):     script_dir = os.path.dirname(directory)    rel_path = files[n]    abs_file_path = os.path.join(script_dir, rel_path)    to_open = pd.read_csv(abs_file_path, header=0)    to_open["Geographic Address"] = to_open["Geographic Address"].astype(str)    to_open["Geographic Address"] = to_open["Geographic Address"].map(lambda x: x[3:-1])    to_open = to_open[to_open["Geographic Address"] == ld_up[n]]    to_open.index = range(len(to_open))    ind = np.searchsorted(to_open["Time"], time[n])    ind = np.asscalar(np.array(ind))    UpperBound = ind - 30    data = to_open.iloc[UpperBound:ind,:]如您所見,從數(shù)據(jù)列中,如果我對輸出進行切片,則僅顯示案例 3 的輸出,我想要一個大文件,同時包含案例 0、1、2、3。
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 306 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號