Skip to content

Commit da85a3c

Browse files
committed
Merge pull request #4549 from bburan-galenea/bburan-galenea/apply_exception_traceback
ENH/API: Keep original traceback in DataFrame.apply
2 parents ecca28d + e05d508 commit da85a3c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

doc/source/release.rst

+2
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,8 @@ See :ref:`Internal Refactoring<whatsnew_0130.refactoring>`
262262
if code argument out of range (:issue:`4519`, :issue:`4520`)
263263
- Fix reindexing with multiple axes; if an axes match was not replacing the current axes, leading
264264
to a possible lazay frequency inference issue (:issue:`3317`)
265+
- Fixed issue where ``DataFrame.apply`` was reraising exceptions incorrectly
266+
(causing the original stack trace to be truncated).
265267

266268
pandas 0.12
267269
===========

pandas/core/frame.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3632,7 +3632,7 @@ def _apply_standard(self, func, axis, ignore_failures=False, reduce=True):
36323632
except (NameError, UnboundLocalError): # pragma: no cover
36333633
# no k defined yet
36343634
pass
3635-
raise e
3635+
raise
36363636

36373637
if len(results) > 0 and _is_sequence(results[0]):
36383638
if not isinstance(results[0], Series):

0 commit comments

Comments
 (0)