diff --git a/pandas/core/series.py b/pandas/core/series.py index e97789d528096..b8c69a877d657 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1353,8 +1353,8 @@ def apply(self, func): result = Series(result, index=self.index, name=self.name) return result except Exception: - return Series([func(x) for x in self], index=self.index, - name=self.name) + vfunc = np.vectorize(func) + return Series(vfunc(self), index=self.index,name=self.name) def align(self, other, join='outer', copy=True): """