擅长:python、mysql、java
<p>我喜欢python的一点是,你几乎可以在源代码中找到任何东西。并且从<code>pd.Series.eq</code>源代码调用:</p>
<pre><code>def flex_wrapper(self, other, level=None, fill_value=None, axis=0):
# other stuff
# ...
if isinstance(other, ABCSeries):
return self._binop(other, op, level=level, fill_value=fill_value)
</code></pre>
<p>然后转到<code>pd.Series._binop</code>:</p>
^{pr2}$
<p>这意味着<code>eq</code>运算符在比较之前对两个序列进行对齐(显然,正常运算符<code>==</code>没有)。在</p>