def _rename_dask(df, names):
 assert isinstance(df, _Frame)
 metadata = _rename(names, df._meta)
 name = 'rename-{0}'.format(tokenize(df, metadata))
 dsk = {}
 for i in range(df.npartitions):
  dsk[(name, i)] = (_rename, metadata, (df._name, i))
 return new_dd_object(merge(dsk, df.dask), name, metadata, df.divisions)

def _rename_dask ( df , names ) : assert isinstance ( df , _Frame ) metadata = _rename ( names , df . _meta ) name = 'rename-{0}' . format ( tokenize ( df , metadata ) ) dsk = { } for i in range ( df . npartitions ) : dsk [ ( name , i ) ] = ( _rename , metadata , ( df . _name , i ) ) return new_dd_object ( merge ( dsk , df . dask ) , name , metadata , df . divisions )
destructively rename columns of dd .