pd.concat(objs, axis=0, join='outer', join_axes=none, ignore_index=false,
keys=none, levels=none, names=none, verify_integrity=false,
copy=true)
引數含義
key引數
join引數
預設join = 'outer',為取並集的關係
in [8]: df4 = pd.dataframe(,
...: index=[2, 3, 6, 7])
...:
in [9]: result = pd.concat([df1, df4], axis=1)
結果:
當設定join = 'inner',則說明為取交集
in [10]: result = pd.concat([df1, df4], axis=1, join='inner')
結果:
如果索引想從原始dataframe重用
確切索引
:
in [11]: result = pd.concat([df1, df4], axis=1, join_axes=[df1.index]) #設定索引為df1的索引
pandas文件:
pandas的連線函式concat 函式
pd.concat objs,axis 0,join outer join axes none,ignore index false,keys none,levels none,names none,verify integrity false,copy true 引數含義 objs series,...
Pandas 連線合併函式merge
一 merge函式用途 pandas中的merge 函式類似於sql中join的用法,可以將不同資料集依照某些字段 屬性 進行合併操作,得到乙個新的資料集。二 merge 函式的具體引數 引數 說明how 預設為inner,可設為inner outer left right on根據某個字段進行連線...
Excel 2016中的新增函式之CONCAT
excel 2016中的新增函式之concat 在2016年1月功能更新中,excel 2016新增幾個常用重要函式,主要有 ifs,switch,maxifs,minifs,concat,textjoin等。注意,要能使用上述函式,office的版本很重要,並不是所有的office 2016能使用...