Skip to content

Commit 1e04454

Browse files
committed
rewrote error capture
1 parent 3e3660d commit 1e04454

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/generic.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3479,8 +3479,8 @@ class animal locomotion
34793479
if isinstance(index, MultiIndex):
34803480
try:
34813481
loc, new_index = self.index.get_loc_level(key, drop_level=drop_level)
3482-
except TypeError:
3483-
raise TypeError(f"Expected label or tuple of labels, got {key}")
3482+
except TypeError as e:
3483+
raise TypeError(f"Expected label or tuple of labels, got {key}") from e
34843484
else:
34853485
loc = self.index.get_loc(key)
34863486

0 commit comments

Comments
 (0)