def cleanNan(data):
    """ Clean data from NaN, columns with all NaNs and rows with at least one NaN """

    # Drop columns which have all columns as NaN
    remove_cols = data.dtypes[data.isnull().all()].index
    if len(remove_cols) > 0:
        data = data.drop(remove_cols, axis=1)
        print(f'The following columns have been removed: {list(remove_cols)}')

    # Drop rows which have at least one NaN
    print(f'Dropping {data.isnull().any(axis=1).sum()} rows because of NaN values')
    data = data[data.notnull().all(axis=1)]

    return data