performance issue - apply with pd.Series vs tuple
https://groups.google.com/forum/#!topic/pydata/8Xr7SBmCvbs

Below is 2 versions of applyshift function (if you comment out some places), in one case it returns tuple and in the other case pandas Series.

Then this function is applied to a large pandas dataframe along each row (axis=1).

Why is the running time slower about 10 times with pd.Series???

```
def applyshift(col1,col2,col3,col4):
    if abs(col1-0)<0.01:
        #return pd.Series(dict(zip(('col2','col3','col4'),
        return (
                   0,0,col4)#)))
    if abs(col1-1)<0.01:
        #return pd.Series(dict(zip(('col2','col3','col4'),
        return (
                    col2,0,col4)#)))

%%time
df2=df1.apply(lambda row: applyshift(
        row['col1'],row['col2'],row['col3'],row['col4']), axis=1)
```
