Location of the documentation
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.corr.html
Documentation problem
How should I get the correlation among the rows? I can obviously do df.T.corr()
but this strikes me as a workaround rather than a nice way to do things. I wrote a df.corr(axis=1)
assuming that would work. Curious what people feel is idiomatic, and would recommend some mention in the docs.
Comment From: WillAyd
You should try asking on StackOverflow where the Q&A format is better served to answer this. This board is reserved for issues and enhancement requests
Comment From: alexlenail
@WillAyd (I should have mentioned this in my original post:) StackOverflow has an answer recommending df.T.corr(), but although that works I don't think it's idiomatic, and if there's a better way, I think it should be mentioned in the docs. If not, I'm recommending that the .corr() function be updated to take an axis
keyword argument.
Comment From: WillAyd
Oh OK I see. Sure let's log as a request for the axis argument then
Comment From: kc611
35984
Comment From: dsaxton
Also for symmetry would be nice to add to DataFrame.cov