程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Python merge data, multi table join query

編輯:Python

Python Merge data 、 Multi table join query - Tencent cloud developer community - Tencent cloud We can go through DataFrame or Series Type of concat Method , To connect , When the connection , Will align according to the index .https://cloud.tencent.com/developer/article/1859924

1、concat()

We can go through DataFrame or Series Type of concat Method , To connect , When the connection , Will align according to the index .

  • axis: Specify the connection axis , The default is 0( Up and down ).【axis=0/1】
  • join: Specify connection mode , External connection by default .【join='outer': Combine ,join='inner': intersection 】
  • keys: It can be used to distinguish different data groups . Form a hierarchical index 【 This is a little more difficult to understand 】
  • join_axes: Specify the index reserved in the connection result set . Keep all by default 【 Such as :join_axes=[df1.columns]】
  • ignore_index: Ignore the index of the original connection , Create a new integer sequence index , The default is False.【ignore_index=True/False】
  • sort:concat after , Whether to sort by column index ,sort=True/False


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved