def stack_partitions(dfs, divisions, join='outer'):
 meta = methods.concat([df._meta for df in dfs], join=join)
 empty = strip_unknown_categories(meta)
 name = 'concat-{0}'.format(tokenize(*dfs))
 dsk = {}
 i = 0
 for df in dfs:
  dsk.update(df.dask)
  try:
   (df._meta == meta)
   match = True
  except (ValueError, TypeError):
   match = False
  for key in df._keys():
   if match:
    dsk[(name, i)] = key
   else:
    dsk[(name, i)] = (methods.concat, [empty, key], 0, join)
   i += 1
 return new_dd_object(dsk, name, meta, divisions)

def stack_partitions ( dfs , divisions , join = 'outer' ) : meta = methods . concat ( [ df . _meta for df in dfs ] , join = join ) empty = strip_unknown_categories ( meta ) name = 'concat-{0}' . format ( tokenize ( * dfs ) ) dsk = { } i = 0 for df in dfs : dsk . update ( df . dask ) try : ( df . _meta == meta ) match = True except ( ValueError , TypeError ) : match = False for key in df . _keys ( ) : if match : dsk [ ( name , i ) ] = key else : dsk [ ( name , i ) ] = ( methods . concat , [ empty , key ] , 0 , join ) i += 1 return new_dd_object ( dsk , name , meta , divisions )
concatenate partitions on axis=0 by doing a simple stack .