Search code examples
pythonpython-3.xpandascorrelationpearson-correlation

What is the default value of pandas corr()


I am using pandas corr() as follows using my dataframe df.

print(df.corr())

However, pandas documentation does not say what would be assigned as the default correlation method if we keep it as empty.

Link to the documentation: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.corr.html

I would like to know what is the default correlation method in pandas?

I am happy to provide more details if needed.


Solution

  • You can see from the documentation:

    DataFrame.corr(method='pearson', min_periods=1)
    

    So it uses Pearson standard correlation coefficient.