python - Intersection of multiple pandas dataframe -
i have number of dataframes in list as:
framelist = [df1,df2,..,df100] each dataframe made of first column "datetime" , second column "temperature".
how find common temperature column dataframes in list intersecting on datetime. using pandas merge not going work have redo pairwise intersection multiple times.
edit:
changed column heading intersection think word merge confusing.
edit:
my final output should have datetime first column followed temperature df1, temperature df2, temperature df3, .., temperature df100.
use pd.concat, works on list of dataframes or series.
pd.concat(framelist, axis=1, join='inner') this better using pd.merge, pd.merge copy data pairwise every time executed. pd.concat copies once. however, pd.concat merges based on axes, whereas pd.merge can merge on (multiple) columns.
Comments
Post a Comment