def clean(dataframe):
    """Cleans the imported data for easy processing.

    Removes end of lines chars, multiple spaces, and lowercases everything

    :params: a dataframe
    :return: a dataframe with clean data
    """

    # Someone thought it would be a good idea to add line breaks
    # to the longer strings in Excel - this removes them
    dataframe = dataframe.replace(to_replace='\n', value=' ', regex=True)

    # There are also multiple spaces in the strings - this removes them
    dataframe = dataframe.replace('\s+', ' ', regex=True)

    # And now to remove the leading spaces and lowercase everything
    # Need to do this conditionally since some of the cols have integers
    for col in dataframe.columns:
        dataframe[col] = dataframe[col].map(lambda x: x.strip().lower() if isinstance(x, str) else x)

    return dataframe