def match_column_specs(experiments, column_specs):
    if not PANDAS_AVAILABLE:
        raise ImportError("The pandas library was not found. You can"
                          " install it with pip.")
    # We iterate over all column and match each spec to the
    # channels of all experiments.
    df = pandas.DataFrame()
    for spec in column_specs:
        if ":" in spec:
            exp_spec, column_spec = spec.split(":")
            exp_spec = int(exp_spec)
        else:
            exp_spec, column_spec = None, spec

        for i, exp in enumerate(experiments.values()):
            for column in fnmatch.filter(exp.columns, column_spec):
                if exp_spec is not None and exp_spec != i:
                    # We are looking for a specific experiment..
                    #  ... and it's not this one.
                    continue

                column_name = "{}:{}".format(i, column)

                exp = exp.rename(columns={column: column_name})
                df = pandas.concat((df, exp[column_name]), axis=1)

    return df
Filter a dictionary with experiments according to column_specs.
dataset/ETHPy150Open mila-udem/blocks-extras/blocks_extras/scripts/plot.py/match_column_specs