Where to find the source code for pandas DataFrame __add__
<p>I am trying to understand what (how) happens when two <code>pandas.DataFrame</code>s are added/subtracted.</p>

<pre><code>import pandas as pd
df1 = pd.DataFrame([[1,2], [3,4]])
df2 = pd.DataFrame([[11,12], [13,14]])

df1 + df2     # Which function is called?
</code></pre>

<p>My understanding is <code>__add__</code> function should be implemented in a class to overload <code>+</code> operator, but in the <a href="https://github.com/pandas-dev/pandas/blob/master/pandas/core/frame.py#L204" rel="nofollow">source code</a> for <code>pandas.core.frame.DataFrame</code> and all its parent classes no such function is found. </p>

<p>Where should I look for the function which is doing this job?</p>

<p>I think you need check <a href="https://github.com/pandas-dev/pandas/blob/master/pandas/core/ops.py#L166" rel="nofollow">this</a>:</p>

<pre><code>def add_special_arithmetic_methods(cls, arith_method=None,
                                   comp_method=None, bool_method=None,
                                   use_numexpr=True, force=False, select=None,
                                   exclude=None, have_divmod=False):
...
...
</code></pre>

python pandas