def _remove_spaces_from_column_names(original):
    """Remove spaces from column names to ensure compatibility with parquet

    Parameters
    ----------
    original : dataset
       the original dataset

    Returns
    -------
    dataset
       dataset with columns renamed
    """
    for existingName in original.columns:
        newName = existingName.replace(' ', '')
        original = original.withColumnRenamed(existingName, newName)
    return original
