2

I am running a code that calculates the correlation (Pearson) between columns in a DataFrame and then unstacks it to build a graph on it.

However the pandas dataframe.corr() is quite slow atm (21 000 columns) and I saw that numpy.corrcoef() might be much faster as I don't have NaNs.

However I use df.unstack() on the correlation results and I couldn't find a numpy equivalent

mayosten
  • 574
  • 4
  • 16
Mayeul sgc
  • 1,754
  • 2
  • 18
  • 32

0 Answers0