def categorize(df, columns=None, **kwargs):
    if columns is None:
        dtypes = df.dtypes
        columns = [name for name, dt in zip(dtypes.index, dtypes.values)
                    if dt == 'O']
    if not isinstance(columns, (list, tuple)):
        columns = [columns]

    distincts = [df[col].drop_duplicates() for col in columns]
    values = compute(*distincts, **kwargs)

    func = partial(_categorize_block, categories=dict(zip(columns, values)))
    return df.map_partitions(func, columns=df.columns)
urlsafe_b64encode without padding
dataset/ETHPy150Open dask/dask/dask/dataframe/categorical.py/categorize--crossover with--dataset/ETHPy150Open chalasr/Flask-P2P/venv/lib/python2.7/site-packages/wheel/util.py/urlsafe_b64encode