Intersection of two or more DataFrame columns

后端 未结 3 621
盖世英雄少女心
盖世英雄少女心 2020-12-18 12:24

I am trying to find the intersect of three dataframes, however the pd.intersect1d does not like to use three dataframes.

import numpy as np
imp         


        
3条回答
  •  独厮守ぢ
    2020-12-18 13:09

    You can using concat

    pd.concat([df1.head(1),df2.head(1),df3.head(1)],join='inner').columns
    Out[81]: Index(['C', 'D'], dtype='object')
    

提交回复
热议问题