Skip to content

Commit 82099b1

Browse files
Marco GorelliMarcoGorelli
Marco Gorelli
authored andcommitted
Use ABCMultiindex to assert type of index
1 parent 63f2d47 commit 82099b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/frame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6263,7 +6263,7 @@ def explode(self, column: Union[str, Tuple]) -> "DataFrame":
62636263
exploded_col = frame.pop(column).reset_index(drop=True).explode()
62646264
result = frame.reset_index().join(exploded_col)
62656265

6266-
if isinstance(self.index, MultiIndex):
6266+
if isinstance(self.index, ABCMultiIndex):
62676267
result.index = pandas.MultiIndex.from_frame(
62686268
result.iloc[:, : self.index.nlevels]
62696269
)

0 commit comments

Comments
 (0)