If you want to remove the correlated variables from a dataframe, use feature_engine.DropCorrelatedFeatures.
feature_engine.DropCorrelatedFeatures
In the code above, I drop the variables with a correlation above 0.8.
Link to feature-engine.
Google Colab notebook of the code snippet above.