def find_variable_level(levels, variable):
    """ Returns the first level found for variable in a MultiIndexLevel

        Example:
            >> df.columns.levels
                FrozenList([[u'aldurflo'], [u'1.0', u'2.0', u'3.0', u'All']])
            >> level = find_variable_level(df.columns.levels, 'All')
               # level is 1

       Warning: It will crash if the variable is not in the MultiIndex.Level
    """
    for idx, level in enumerate(levels):
        if variable in level:
            return idx
    return None
    # return [idx for idx, level in enumerate(levels) if variable in level][0]