original_docstring:  Shuffle using local disk
  
      See Also
      --------
      rearrange_by_column_tasks:
          Same function, but using tasks rather than partd
          Has a more informative docstring
      
docstring: Shuffle using local disk
  See Also
  
  Same function, but using tasks rather than partd
  Has a more informative docstring
docstring_tokens: Shuffle using local disk See Also Same function but using tasks rather than partd Has a more informative docstring
code: def rearrange_by_column_disk(df, column, npartitions=None, compute=False):
      """ Shuffle using local disk
  
      See Also
      --------
      rearrange_by_column_tasks:
          Same function, but using tasks rather than partd
          Has a more informative docstring
      """
      if npartitions is None:
          npartitions = df.npartitions
  
      token = tokenize(df, column, npartitions)
      always_new_token = uuid.uuid1().hex
  
      p = ("zpartd-" + always_new_token,)
      dsk1 = {p: (maybe_buffered_partd(),)}
  
      # Partition data on disk
      name = "shuffle-partition-" + always_new_token
      dsk2 = {
          (name, i): (shuffle_group_3, key, column, npartitions, p)
          for i, key in enumerate(df.__dask_keys__())
      }
  
      dependencies = []
      layer = {}
      if compute:
          graph = HighLevelGraph.merge(df.dask, dsk1, dsk2)
          keys = [p, sorted(dsk2)]
          pp, values = compute_as_if_collection(DataFrame, graph, keys)
          dsk1 = {p: pp}
          dsk2 = dict(zip(sorted(dsk2), values))
      else:
          dependencies.append(df)
  
      # Barrier
      barrier_token = "barrier-" + always_new_token
      dsk3 = {barrier_token: (barrier, list(dsk2))}
  
      # Collect groups
      name = "shuffle-collect-" + token
      dsk4 = {
          (name, i): (collect, p, i, df._meta, barrier_token) for i in range(npartitions)
      }
  
      divisions = (None,) * (npartitions + 1)
  
      layer = toolz.merge(dsk1, dsk2, dsk3, dsk4)
      graph = HighLevelGraph.from_collections(name, layer, dependencies=dependencies)
  
      return DataFrame(graph, name, df._meta, divisions)
code_tokens: def rearrange_by_column_disk ( df , column , npartitions = None , compute = False ) : if npartitions is None : npartitions = df . npartitions token = tokenize ( df , column , npartitions ) always_new_token = uuid . uuid1 ( ) . hex p = ( "zpartd-" + always_new_token , ) dsk1 = { p : ( maybe_buffered_partd ( ) , ) } name = "shuffle-partition-" + always_new_token dsk2 = { ( name , i ) : ( shuffle_group_3 , key , column , npartitions , p ) for i , key in enumerate ( df . __dask_keys__ ( ) ) } dependencies = [ ] layer = { } if compute : graph = HighLevelGraph . merge ( df . dask , dsk1 , dsk2 ) keys = [ p , sorted ( dsk2 ) ] pp , values = compute_as_if_collection ( DataFrame , graph , keys ) dsk1 = { p : pp } dsk2 = dict ( zip ( sorted ( dsk2 ) , values ) ) else : dependencies . append ( df ) barrier_token = "barrier-" + always_new_token dsk3 = { barrier_token : ( barrier , list ( dsk2 ) ) } name = "shuffle-collect-" + token dsk4 = { ( name , i ) : ( collect , p , i , df . _meta , barrier_token ) for i in range ( npartitions ) } divisions = ( None , ) * ( npartitions + 1 ) layer = toolz . merge ( dsk1 , dsk2 , dsk3 , dsk4 ) graph = HighLevelGraph . from_collections ( name , layer , dependencies = dependencies ) return DataFrame ( graph , name , df . _meta , divisions )
short_docstring: Shuffle using local disk
  See Also
short_docstring_tokens: Shuffle using local disk See Also
comment: """ Shuffle using local disk
  
      See Also
      --------
      rearrange_by_column_tasks:
          Same function, but using tasks rather than partd
          Has a more informative docstring
      """$SEP$# Partition data on disk$SEP$# Barrier$SEP$# Collect groups