Skip to content

Commit ad0da03

Browse files
author
Marco Gorelli
committed
Use ABCMultiindex to assert type of index
1 parent f8ce5e3 commit ad0da03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/frame.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6248,7 +6248,7 @@ def explode(self, column: Union[str, Tuple]) -> "DataFrame":
62486248
exploded_col = frame.pop(column).reset_index(drop=True).explode()
62496249
result = frame.reset_index().join(exploded_col)
62506250

6251-
if isinstance(self.index, MultiIndex):
6251+
if isinstance(self.index, ABCMultiIndex):
62526252
result.index = pandas.MultiIndex.from_frame(
62536253
result.iloc[:, : self.index.nlevels]
62546254
)

0 commit comments

Comments
 (0)