Merge all these 3 dataframes into one dataframe: df19[['Country or region', 'GDP per capita']]\ .sort_values(by='GDP per capita', ascending=False).head(20)[0:1] df19[['Country or region', 'GDP per capita']]\ .sort_values(by='GDP per capita', ascending=False).head(20)[19:20] rus[['Country or region', 'GDP per capita']]
def merge(df1, df2, df3): return pd.concat([df1, df2, df3], axis=0)