How does Pandas resolve the function specified by name in df.agg
问题 I'm learning Pandas and Numpy, currently going through this section of the tutorial. I'm new to Python altogether, so this is probably a basic beginner's question. Given this data frame: df = pd.DataFrame(np.random.randn(4, 3), columns=['A', 'B', 'C'], index=pd.date_range('1/1/2000', periods=4)) df.iloc[3:7] = np.nan I can't explain the difference between the following results of df.agg: Call 1: df.agg(sum) #Result: A NaN B NaN C NaN dtype: float64 Call 2: df.agg('sum') #Result: A -1.776752 B