in [ ]df out[ ]col col col col col col col col col col col col col col col col col col col col in [ ]df pd dataframe({'col '['col ''col ''col ''col ']'col '['col ''col ''col ''col ']'col '['col ''col ''col ''col ']}index=[ ]in [ ]pd concat([df ,df ]axis= out[ ]col col col col col col col col col col col nan nan nan col col col col nan nan nan col col col col col col col col col col col col col col nan nan nan nan col col col nan nan nan nan col col col database style concatenations using the merge command the most familiar way to concatenate data (for those acquainted with relational databasesis using the join operation provided by the databases pandas provides database friendly set of join operations for dataframes these operations are optimized for high performance and are often the preferred method for joining disparate dataframes joining by columnsthis is the most natural way of joining two dataframes in this methodwe have two dataframes sharing common column and we can join the two dataframes using that column the pandas library has full range of join operations (innerouterleftrightetc and we will demonstrate the use of inner join in this sub-section you can easily figure out how to do the rest of join operations by checking out the pandas documentation for this examplewe will break our original cities data into two different dataframesone having the city information and the other having the country information thenwe can join them using one of the shared common columns in [ ]country_data city_data[['iso ','country']drop_duplicates(in [ ]country_data shape out[ ]( in [ ]country_data head(out[ ]iso country afg afghanistan ald aland alb albania dza algeria asm american samoa