擅长:python、mysql、java
<p>你应该使用<code>.dot</code>这只是为了好玩</p>
<pre><code>df1=pd.DataFrame(index=df.columns,columns=df.columns)
df1.apply(lambda x : [sum(df[x.name]*df[y]) for y in x.index])
Out[65]:
dan ste bob
dan 9 2 4
ste 2 6 2
bob 4 2 9
</code></pre>