Skip to content

Commit 4f15df2

Browse files
authored
TYP: Fix typing of frame.explode (#43834)
1 parent b4a8e5f commit 4f15df2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/core/frame.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8201,7 +8201,7 @@ def stack(self, level: Level = -1, dropna: bool = True):
82018201

82028202
def explode(
82038203
self,
8204-
column: Scalar | tuple | list[Scalar | tuple],
8204+
column: IndexLabel,
82058205
ignore_index: bool = False,
82068206
) -> DataFrame:
82078207
"""
@@ -8211,7 +8211,7 @@ def explode(
82118211
82128212
Parameters
82138213
----------
8214-
column : Scalar or tuple or list thereof
8214+
column : IndexLabel
82158215
Column(s) to explode.
82168216
For multiple columns, specify a non-empty list with each element
82178217
be str or tuple, and all specified columns their list-like data
@@ -8293,7 +8293,7 @@ def explode(
82938293
if not self.columns.is_unique:
82948294
raise ValueError("columns must be unique")
82958295

8296-
columns: list[Scalar | tuple]
8296+
columns: list[Hashable]
82978297
if is_scalar(column) or isinstance(column, tuple):
82988298
columns = [column]
82998299
elif isinstance(column, list) and all(

0 commit comments

Comments
 (0)