I'm using Pandas' .corr() method to figure out which columns I can eliminate from a large dataset. Some of those columns have non-numeric types.

How does Pandas handle these columns?


1 Answer 1


According to this source, Pandas will ignore any columns that are non-numeric.

If you want Pandas to perform correlations on your categorical variables you'll have to turn them into dummy variables using pandas.get_dummies() (reference) or something similar.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.