Lets say I have a dataframe, df with 10 columns, and several hundred rows. Those columns are labeled A, B, C, ...
Further, I have a pandas Series, s containing data that is the same several hundred rows in length.
What I would like to do is get a DataFrame that contains the covariance of each of my rows in df with the series s. Something like:
cov_s
A 0.003
B 0.0089
C 0.0032
...
J 0.0192
I would like to avoid adding the s as a column of df and doing df.cov() and taking the one column under the added s, as my data sets are likely to get quite large, and doing a full covariance matrix may have some convergence issues (whereas doing just a 2 series cov wont have this issue). Any ideas on how to accomplish this?