pandas DataFrame merge

原创转载请注明出处:https://www.cnblogs.com/agilestyle/p/12253890.html

 

数据表合并

有时候需要将多个渠道源的多个数据表进行合并,一个 DataFrame 相当于一个数据库的数据表,那么多个 DataFrame 数据表的合并就相当于多个数据库的表合并。

 

基于指定列进行连接

 

inner 内连接

 

left 左连接

 

right 右连接

 

outer 外连接

 

Reference

https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.merge.html

https://time.geekbang.org/column/article/73971

posted @ 2020-02-02 21:50  李白与酒  阅读(326)  评论(0编辑  收藏  举报