只返回一个列表而不是元组。
In [81]: dfOut[81]: x y zts 2014-05-15 10:38:00 0.120117 0.987305 0.1162112014-05-15 10:39:00 0.117188 0.984375 0.1220702014-05-15 10:40:00 0.119141 0.987305 0.1191412014-05-15 10:41:00 0.116211 0.984375 0.1201172014-05-15 10:42:00 0.119141 0.983398 0.118164[5 rows x 3 columns]In [82]: def myfunc(args): ....: e=args[0] + 2*args[1] ....: f=args[1]*args[2] +1 ....: g=args[2] + args[0] * args[1] ....: return [e,f,g] ....:In [83]: df.apply(myfunc ,axis=1)Out[83]: x y zts 2014-05-15 10:38:00 2.094727 1.114736 0.2348032014-05-15 10:39:00 2.085938 1.120163 0.2374272014-05-15 10:40:00 2.093751 1.117629 0.2367702014-05-15 10:41:00 2.084961 1.118240 0.2345122014-05-15 10:42:00 2.085937 1.116202 0.235327



