def _set_columns(x, columns):
    """ set the columns attribute of something it is possible
    
    if columns is None, or x doesn't have an columns attribute it won't do anything
    
    """
    if columns is None:
        return x
    if hasattr(x, 'columns'):
        x.columns = columns
    return x
