def remcor(x, limit = 0.9):
    dataset = copy(x)
    col_corr = set(); corr_matrix = dataset.corr()
    for i in range(len(corr_matrix.columns)):
        for j in range(i):
            if corr_matrix.iloc[i, j] >= limit:
                colname = corr_matrix.columns[i]
                col_corr.add(colname)
                if colname in dataset.columns: del dataset[colname]
    return dataset