pandas.DataFrame.merge
DataFrame.merge(right, how=‘inner’, on=None, left_on=None, right_on=None, left_index=False, right_index=False, sort=False, suffixes=(’_x’, ‘_y’), copy=True, indicator=False)[source]
right:右边的df
how:连接方式。Inner outer left right
left_on:连接的左边的列名。right_on是右边的
pandas.concat
pandas.concat(objs, axis=0, join=‘outer’, join_axes=None, ignore_index=False, keys=None, levels=None, names=None, verify_integrity=False, copy=True)[source]
objs:要连接的列表,a sequence or mapping of Series, DataFrame, or Panel objects
axis:0表示连接在表下方,表变长了;1表示连接在右侧,表变宽了
join : {‘inner’, ‘outer’}, default ‘outer’
names : list, default None
-Names for the levels in the resulting hierarchical index