一、使用场景:

批量合并相同格式的excel,给DataFrame添加行、列

二、concat()用法:

pd.concat(obj,axis=0,join='outer',ignore_index=False)

  obj:是一个列表,内容可以是dataframe也可以是series,也可以混合

  axis:默认是0,即按行合并

  join:默认是outer,也就是取两个数据的并集;inner是取交集

  ignore_index:是否忽略原数据的index

三、append()用法:

pd.append(other,ignore_index=False)

  append()相当于是concat的按行合并

  other:单个dataframe、series、dict、list都可以

四、实例

1、两个dataframe的合并

http://localhost:8888/notebooks/%E6%95%B0%E6%8D%AE%E5%90%88%E5%B9%B6.ipynb

2、dataframe添加一列