0

From what I understand the numeric_only argument is deprecated in the corr() function, so that it is set to false. I have a dataset and some of the columns aren't numeric, so that I want to to have correlation of only the these numeric columns. However when I write corr(numeric_only = True) I get this type error,

TypeError: corr() got an unexpected keyword argument 'numeric_only'

Tried other solutions and checking the documentation

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Does this answer your question? [Correlation between two non-numeric columns in a Pandas DataFrame](https://stackoverflow.com/questions/47002168/correlation-between-two-non-numeric-columns-in-a-pandas-dataframe) – B. Eckles Nov 30 '22 at 21:58

1 Answers1

2

This method is only available in pandas version 1.5.0 or higher.

You should update your package with

pip install --upgrade pandas
ArtGMlg
  • 33
  • 4