trying with the pg.pairwise_corr method I get the following error:
pg.pairwise_corr(df)
/usr/local/lib/python3.7/dist-packages/pingouin/correlation.py in corr(x, y, tail, method, **kwargs)
507 x = np.asarray(x)
508 y = np.asarray(y)
--> 509 assert x.ndim == y.ndim == 1, 'x and y must be 1D array.'
510 assert x.size == y.size, 'x and y must have the same length.'
511
AssertionError: x and y must be 1D array.
I tryed around with the function, selecting only one column like this
pg.pairwise_corr(df, columns='col')
and get the same error.
In fact, all columns of my dataframe have the same lenght. (And it works perfectly fine for another dataframe). However I used the pd.concat method to concat some files, but this should not matter when the object is a data.frame in the end or?
Thanks for advises!!
meanwhile I solved my problem.
after
I saved the df as .csv file. Then I again read in the df using
Like this, the function
worked properly.