import re


def keyclean(key):
    """
    Default way to clean table headers so they make good
    dictionary keys.
    """
    clean = re.sub(r'\s+', '_', key.strip())
    clean = re.sub(r'[^\w]', '', clean)
    return clean