Python Learn Mark

10/21/2107:

  • 修饰器

In [3]:
import pandas as pd
import numpy as np
df = pd.DataFrame(np.random.randn(10, 3), columns=['A', 'B', 'C'],
                  index=pd.date_range('1/1/2000', periods=10))
df.agg({'C': sum})


Out[3]:
C    1.095748
dtype: float64