def perievents_to_columns(perievents):
    """
    rearranges perievents to an column-based format
    that makes it easier to use for plotting frameworks
    :param perievents: perievent df
    :return: perievent df with one column zdFF and other dimensions as index
    """
    # restack to make a column-based format
    perievents = perievents.stack(level=['channel', 'FrameCounter'])
    return perievents.to_frame('zdFF')