Reputation: 4499
I am trying to understand what (how) happens when two pandas.DataFrame
s are added/subtracted.
import pandas as pd
df1 = pd.DataFrame([[1,2], [3,4]])
df2 = pd.DataFrame([[11,12], [13,14]])
df1 + df2 # Which function is called?
My understanding is __add__
function should be implemented in a class to overload +
operator, but in the source code for pandas.core.frame.DataFrame
and all its parent classes no such function is found.
Where should I look for the function which is doing this job?
Upvotes: 2
Views: 2848