one nan nan two nan nan three nan nan in the case of combining series along axis= the keys become the dataframe column headersin [ ]pd concat([ ]axis= keys=['one''two''three']out[ ]one two three nan nan nan nan nan nan nan nan nan nan nan nan nan nan the same logic extends to dataframe objectsin [ ]df dataframe(np arange( reshape( )index=[' '' '' ']columns=['one''two']in [ ]df dataframe( np arange( reshape( )index=[' '' ']columns=['three''four']in [ ]pd concat([df df ]axis= keys=['level ''level ']out[ ]level level one two three four nan nan if you pass dict of objects instead of listthe dict' keys will be used for the keys optionin [ ]pd concat({'level 'df 'level 'df }axis= out[ ]level level one two three four nan nan there are couple of additional arguments governing how the hierarchical index is created (see table - )in [ ]pd concat([df df ]axis= keys=['level ''level ']names=['upper''lower']out[ ]upper level level lower one two three four nan nan combining and merging data sets www it-ebooks info