def state_bin2num(x, state_num_dict=None):
    """
    Simple function to assign a single state index based on serval columns in a dataframe.
    Perhaps I should use something like this to do transition based assignments?

    """
    if state_num_dict is None:
       state_num_dict = {(0,0) : 0, (0,1) : 1, (1,0) : 2, (1,1) : 3 }
    return state_num_dict[(x[0], x[1])]